Hi,

you can use a configuration option of the maven-war-plugin (attachClasses) which will produce a separate jar of the classes you have in your war module:

http://maven.apache.org/plugins/maven-war-plugin/war-mojo.html#attachClasses

This jar is separately installed and can be used by other as a usual dependency ...but be aware that you need to use a classifier for this artifact..


The problem with build-helper-maven-plugin is that is will replace the original artifact which is the default...in such cases you should use a classifier...

Furthermore you have configured the maven-jar-plugin a second time in your build which will also replace the original artifact...cause maven-jar-plugin is not being part of the life cycle in case of packaging "war"....

Kind regards
Karl Heinz Marbaise


On 12/19/15 12:48 PM, Oliver B. Fischer wrote:
Hi,

my project is build as war but I need also a jar of the classes.
Therefore I build also a .jar and use the build-helper-maven-plugin to
attach it to artifacts to be installed. With this configuration the .jar
will be installed as .war and as .jar. The .war itself will be not
installed.

Sounds like a bug or isn't it a bug?

I prepared an example project available at
https://bitbucket.org/obfischer/bug-maven-install-plugin/src

Oliver

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to