I used the Maven build just for this in my project.
First enable your plugin in your POM and call the build configuration:
<plugin> <artifactId>maven-assembly-plugin</artifactId> <version>2.1</version> <executions> <execution> <id>make-assembly</id> <phase>package</phase> <goals> <goal>attached</goal> </goals> </execution> </executions> <configuration> <descriptors> <descriptor>src/main/assembly/package.xml </descriptor> </descriptors> </configuration> </plugin>
Then in your descriptor you can decide how you want your layout to be before you pack it all.
<assembly> <id>package</id> <formats> <format>zip</format> </formats> <includeBaseDirectory>false</includeBaseDirectory> <fileSets> <fileSet> <directory>src/main/assembly/files</directory> <outputDirectory>/</outputDirectory> <includes> <include>**/conf/*.*</include> <include>**/doc/*.*</include> </includes> </fileSet> <fileSet> <directory>target/jre</directory> <outputDirectory>/jre</outputDirectory> </fileSet> </fileSets> <dependencySets> <dependencySet> <outputDirectory>lib</outputDirectory> <excludes> <exclude>junit:junit</exclude> </excludes> </dependencySet> </dependencySets> </assembly>
This will create a zip file with the layout that you specified in your output configuration directory, pack it all as a zip file (you can select zip, jar, war ...) and deploy it to my repository using the rest.
I skipped bits and pieces to simplify it, but my package expands to include batch files, dlls, config, doc and JRE so that everything is in one zip file ... all that is needed to run this thing is extract and click start.bat!
Perhaps I could also do this in a bank properly formatted using METADATA, and just double-click on the bank itself to start all this, I did not need or did not have time to play with this option, but you can also to try.
Beware of versions above 2.1 of the build plugin, it will create duplicate entries, if your directives allow it to find the same file in different places, this will give you a lib folder with the same banks repeating twice. not very dangerous, since unpacking will lead to their collapse, but it is still annoying if you want to unzip them, if you want to overwrite files. Plus the fact that you do not know who won, if in some way they turned out to be different in content.
Maven is great, but I find it sometimes difficult to upset, plus documentation is sometimes difficult to find and use. However, used properly, it will save you a ton of time.
luck