I have a maven project , which needs to copy webapp/WEB-INF/ resources from another maven project which is packaged as a war .
How do I do it ?
PLease suggest
I have a maven project , which needs to copy webapp/WEB-INF/ resources from another
Share
As Bittrance said, you should use the maven dependency plugin.
The better way is to create project that include all your shared resources, probably a type zip, which is build up with the assembly plugin. This is the good “maven way”. It’s a better solution than unpacking a war.
Then, refer it
Next, you use the maven dependency plugin to unpack your resources, in the directory of your choice (probably WEB-INF/ ?)
I’m not realy sure of this code snippet (written for another purpose), but this is an example.
For more information, please follow this link : http://maven.apache.org/plugins/maven-dependency-plugin/
If you can’t shared a common-project including your files, you can unpack war including only ftl (or whatever you want), but it’s not a realy clean solution 😉
There is a lot of posts that deal with this subject :
Unzip dependency in maven
…
Just try with the keywords maven-dependency-plugin, unpack 🙂
Hope that will help you.