Maven: Packaging jar and war artifacts in parallel

I ran across the use case described in the title when working with a legacy web application which also serves as a dependency for other (plugin) projects. To this end, besides the War file which is deployed as web application, I would like to have the contained Jar file being installed separately in my local repository.

This additional artifact can be obtained with a few lines in the pom.xml:


This execution extracts the Jar file which is produced during the preparations of the War file and installs it with the project’s default group id, artifact id, and version.


  • [1] Maven Install Plugin: install-file

Leave a Reply