0

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&amp;includes=**/**&amp;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&amp;includes=**/**&amp;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?

RonK
  • 9,472
  • 8
  • 51
  • 87
  • Did you have a chance to solve this problem ? If so could share the solution here ? Thanks. – Raphael Jolivet Jul 25 '13 at 07:47
  • I honestly don't recall - there was something there related to the fact that I had an overlay based on another overlay - eventually the project got canceled so I didn't get the chance to finish it out. – RonK Jul 28 '13 at 04:15
  • Ok, no worries. I will investigate a bit more then. – Raphael Jolivet Jul 29 '13 at 09:01

0 Answers0