Maven best practice for creating ad hoc zip artifact

Decide what classifier you will use for your zip file, for sake of argument let’s say it would be sample.

In your project create file assembly/sample.xml

Fill in assembly/sample.xml with something like this:

<?xml version="1.0" encoding="UTF-8"?>
  <!-- use this section if you want to package dependencies -->

Add this to your pom’s build section


As a result it should create and install

I suggest you read chapter on assemblies from Sonatype’s maven book:

Also, read assembly format specification:

Leave a Comment