As Bittrance said, you should use the maven dependency plugin.
Itβs best to create a project that includes all of your shared resources, possibly a zip type that is created using the build plugin. This is a good "way for two." This is a better solution than unpacking a war.
Then indicate
<dependency> <groupId>com.mygroup/groupId> <artifactId>my-dependencies</artifactId> <version>1.0.0</version> <type>zip</type> </dependency>
Then you use the maven dependency plugin to unpack the resources in the directory of your choice (possibly WEB-INF /?)
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <executions> <execution> <id>unpack-cfg-test-resources</id> <goals> <goal>unpack-dependencies</goal> </goals> <phase>resources</phase> <configuration> <outputDirectory>${project.build.directory}/WEB-INF/</outputDirectory> <includeArtifacIds>my-resources</includeArtifacIds> <excludeTypes>pom</excludeTypes> <excludeTransitive>true</excludeTransitive> </configuration> </execution> </executions> </plugin>
I'm not quite sure about this piece of code (written for another purpose), but this is an example. For more information, follow this link: http://maven.apache.org/plugins/maven-dependency-plugin/
If you cannot use a common project, including your files, you can unpack the war, including only ftl (or anything), but this is not a very clean solution;)
There are many posts devoted to this topic: Cancel dependency in maven ... Try using the keywords maven-dependency-plugin, unpack :)
Hope this helps.
source share