About software development for the enterprise. Focus on Java EE and more general Java platforms.
You'll read a lot about Conferences, Java User Groups, Java EE, Integration, AS7, WildFly, EAP and other technologies that hit my road.

Tuesday, July 21, 2009

Generating Static WAR Content Archive with Maven

08:48 Tuesday, July 21, 2009 Posted by Markus Eisele
, , , , ,
You may have seen my simple JEE5 maven project setup already. I am trying to add more and more features during the next few weeks that satisfy the needs of enterprise software development.

First add-on is the possibility to have a separate static-web.zip generated, which contains all relevant content, that should be deployed to a separate webserver.

All you have to do is to add the following to your war/pom.xml

<!-- assamble static content -->

Next step is to add a new folder in the web project (src\main\assembly) and create the needed assembly file (static.xml)


If you now run maven clean install than you get a new static-web.zip file generated, which contains all the defined files and folders.