tags:

views:

27

answers:

1

How can I create a multiple files release using Maven? I.e. the release of my application need to be given as a set of directories and files within them, e.g. like a installed JBoss directory structure. How it is possible to do this with Maven? I could produce the main jar file of the application. I have to give it inside a release direcotory, within which there can be a number of other directories like the dependent libs direcotry and some application specific directories.

+1  A: 

The maven-assembly-plugin serves this purpose. You add a src/main/assembly directory to your main project into which you put one or more assembly descriptors. These define what files, dependencies and project modules go into the artifact, using which filtering properties, encoding and line endings. The end result can be a zip or a compressed tar file. If you need more than one package (e.g. Windows and Linux), create multiple assembly-*.xml files.

Barend