How to include the packaged parent in the child (war) package
I have a parent pom whose packaging type is jar
.
Then I have a child pom whose packaging is war
. I want to include the packaged parent jar in开发者_C百科 WEB-INF/lib
of the packaged child.
How do I achieve this?
I'm not sure to understand (a parent pom with a jar
packaging, is this working?) but the "normal way" would be to add a dependency on the JAR artifact in your WAR project. But I think that you know that and that there is a problem (which is the part that is unclear).
Maybe you could use the dependency plugin instead. Use dependency:copy
to get the dependency and copy it to ${project.build.directory}/${finalName}/WEB-INF/lib
during prepare-package
.
精彩评论