I have the following scenario:
- I have a WEB App - lets call it MyWebApp
- It is based on some overlay which is not owned by me - lets call it template
- I wanted to create a wrapping of this overlay in my own code-tree - lets call it my-template
When I base MyWebApp on template - WTP works fine and my wtpwebapps
dir is created as expected.
When I base MyWebApp on my-template - WTP does not copy the overlay at all.
When I run mvn install
- the war I get is identical in both cases. With the slight difference in the META-INF/maven
directory - in my version I don't see the
One important note - when I add the dependency to template back to my project - but leave the overlay to come from my-template - it works fine - so it looks like the problem is in the pom.xml
of my-template.
I'm using:
- Maven 2.2.1
- Eclipse - STS - 2.9.2
- wtp 1.5
The problem only occurs when the my-template project is opened - when I close it, everything works fine.
I can also see it change in the .settings\org.eclipse.wst.common.component
configuration file from:
<dependent-module deploy-path="/" handle="module:/overlay/prj/my-template?unpackFolder=target/m2e-wtp/overlays&includes=**/**&excludes=META-INF/MANIFEST.MF">
<dependency-type>consumes</dependency-type>
</dependent-module>
To:
<dependent-module deploy-path="/" handle="module:/overlay/var/M2_REPO/com/mygroup/my-template/1.0-SNAPSHOT/my-template-1.0-SNAPSHOT.war?unpackFolder=target/m2e-wtp/overlays&includes=**/**&excludes=META-INF/MANIFEST.MF">
<dependency-type>consumes</dependency-type>
</dependent-module>
Below is the pom.xml
of the my-template project:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.mygroup</groupId>
<artifactId>parent</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<artifactId>my-template</artifactId>
<version>16.0-SNAPSHOT</version>
<packaging>war</packaging>
<dependencies>
<dependency>
<groupId>template.group</groupId>
<artifactId>template</artifactId>
<type>war</type>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<overlays>
<overlay>
<groupId>template.group</groupId>
<artifactId>template</artifactId>
</overlay>
</overlays>
</configuration>
</plugin>
</plugins>
</build>
</project>
My question - is there anything wrong with my configuration? Or is it there a configuration for WTP I can change?