Thursday, May 27, 2010

Deploy Maven Artifact As Zip Package Only

I was trying to package a maven artifact as a zip archive lately and found out that it's not as easy as it seems because zip is no native packaging to maven.

I finally found a solution using the maven-assembly-plugin. You have to choose "pom" as packaging because maven would otherwise (try to) build a jar archive which you don't want here. Furthermore you have to set the assembly-plugins configuration key "appendAssemblyId" to false so that the resulting zip package has no classifier you would have to specifiy when using it as dependency later on. Thats my resulting pom.xml:

And thats the assembly descriptor:

There is an easier solution? Damn it and let me know!

Thanks for following

freak

No comments:

Post a Comment

Please leave your comment here.