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 WEB-INF/lib of the packaged child.
How do I achieve this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I’m not sure to understand (a parent pom with a
jarpackaging, 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:copyto get the dependency and copy it to${project.build.directory}/${finalName}/WEB-INF/libduringprepare-package.