how to include dependency classes to war project's WEB-INF/classes folder in maven

Tag: maven Author: litintin123 Date: 2011-03-09

I've a project B which has a dependency on project A. Both project's packaging is jar. Another project C packaging is war. Project C contains no java classes. It contains only webapps folder. Project C has dependency on project B. I want the war to be packaged in just a way that all the java classes from Project A and B should be copied to WEB-INF/classes folder. How can we achieve this ?

Other Answer1

You can use the unpack goal of maven dependency plugin in your pom to unpack the desired dependencies to a folder and ensure maven war plugin includes this folder.