Hi,
We are currently building a Eclipse RAP project with tycho.
To do that we have several plugins that are grouped as an eclipse-feature. In order to build a war for the application we added an ant step in the feature pom.xml that creates the war from the eclipse-feature result (target/site/plugins) and attach this as an artifact using build-helper-maven-plugin.We are currently building a Eclipse RAP project with tycho.
Then we need to bundle this war + the content of the documentation zip artifact into a zip file.
To create this zip file I need to create a maven module that depends on the zip and war artifact.
However it fails to resolve the dependency to the war artifact.
However it fails to resolve the dependency to the war artifact.
When executing with -X. I see a line "Could not find metadata myGroup:war.feature:1.0.0-SNAPSHOT/maven-metadata.xml"
And when I look in my local repository file it seems that there is no metadata file in the myGroup/war.feature/ folder.
Is it a limiation of the feature packaging that prevents me from attaching artifacts? How can I achieve a similar goal?
Here are the extracts from the pom files
-----
pom.xml for feature looks something like this.
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
ÂÂÂ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
ÂÂÂ <modelVersion>4.0.0</modelVersion>
ÂÂÂ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
ÂÂÂ <modelVersion>4.0.0</modelVersion>
ÂÂÂÂ <groupId>myGroup</groupId>
ÂÂÂ <artifactId>war.feature</artifactId>
ÂÂÂ <version>1.0.0-SNAPSHOT</version>
ÂÂÂ <packaging>eclipse-feature</packaging>Â
 <build>
ÂÂÂ ÂÂÂ <plugins>
ÂÂÂ ÂÂÂ ÂÂÂ <plugin>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <groupId>org.apache.maven.plugins</groupId>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <artifactId>maven-antrun-plugin</artifactId>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <version>1.7</version>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <executions>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <execution>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <id>generate-war</id>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <phase>package</phase>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <goals>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <goal>run</goal>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ </goals>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <configuration>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <target >
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ... build war file ...
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ </target>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ </configuration>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ </execution>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ </executions>ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ
ÂÂÂ ÂÂÂ ÂÂÂ </plugin>
ÂÂÂ ÂÂÂ ÂÂÂ <plugin>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <groupId>org.codehaus.mojo</groupId>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <artifactId>build-helper-maven-plugin</artifactId>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <version>1.9</version>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <executions>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <execution>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <id>attach-war</id>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <phase>package</phase>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <goals>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <goal>attach-artifact</goal>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ </goals>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <configuration>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <artifacts>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <artifact>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <file>${war.file}</file>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <type>war</type>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ </artifact>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ </artifacts>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ </configuration>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ </execution>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ </executions>
ÂÂÂ ÂÂÂ ÂÂÂ </plugin>
ÂÂÂ ÂÂÂ </plugins>
ÂÂÂ </build>
</project>
ÂÂÂ <artifactId>war.feature</artifactId>
ÂÂÂ <version>1.0.0-SNAPSHOT</version>
ÂÂÂ <packaging>eclipse-feature</packaging>Â
 <build>
ÂÂÂ ÂÂÂ <plugins>
ÂÂÂ ÂÂÂ ÂÂÂ <plugin>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <groupId>org.apache.maven.plugins</groupId>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <artifactId>maven-antrun-plugin</artifactId>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <version>1.7</version>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <executions>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <execution>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <id>generate-war</id>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <phase>package</phase>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <goals>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <goal>run</goal>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ </goals>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <configuration>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <target >
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ... build war file ...
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ </target>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ </configuration>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ </execution>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ </executions>ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ
ÂÂÂ ÂÂÂ ÂÂÂ </plugin>
ÂÂÂ ÂÂÂ ÂÂÂ <plugin>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <groupId>org.codehaus.mojo</groupId>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <artifactId>build-helper-maven-plugin</artifactId>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <version>1.9</version>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <executions>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <execution>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <id>attach-war</id>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <phase>package</phase>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <goals>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <goal>attach-artifact</goal>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ </goals>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <configuration>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <artifacts>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <artifact>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <file>${war.file}</file>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ <type>war</type>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ </artifact>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ </artifacts>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ </configuration>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ </execution>
ÂÂÂ ÂÂÂ ÂÂÂ ÂÂÂ </executions>
ÂÂÂ ÂÂÂ ÂÂÂ </plugin>
ÂÂÂ ÂÂÂ </plugins>
ÂÂÂ </build>
</project>
pom.xml of the project building the final zip
<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/maven-v4_0_0.xsd">
ÂÂÂ <modelVersion>4.0.0</modelVersion>
ÂÂÂ <packaging>pom</packaging>
ÂÂÂ <groupId>myGroup</groupId>
ÂÂÂ <artifactId>packaging</artifactId>
ÂÂÂ <version>1.0.0-SNAPSHOT</version>
ÂÂÂ <dependencies>
ÂÂÂÂÂÂÂÂ <dependency>
ÂÂÂ ÂÂÂ ÂÂÂ <groupId>myGroup</groupId>
ÂÂÂ ÂÂÂ ÂÂÂ <artifactId>war.feature</artifactId>ÂÂÂ
ÂÂÂ ÂÂÂ ÂÂÂ <version>1.0.0-SNAPSHOT</version>
ÂÂÂ ÂÂÂ ÂÂÂ <type>war</type>
ÂÂÂ ÂÂÂ </dependency>
ÂÂÂ ÂÂÂ <dependency>
ÂÂÂ ÂÂÂ ÂÂÂ <groupId>myGroup</groupId>
ÂÂÂ ÂÂÂ ÂÂÂ <artifactId>documentation</artifactId>ÂÂÂ
ÂÂÂ ÂÂÂ ÂÂÂ <version>1.0.0-SNAPSHOT</version>
ÂÂÂ ÂÂÂ ÂÂÂ <type>zip</type>
ÂÂÂ ÂÂÂ </dependency>
<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/maven-v4_0_0.xsd">
ÂÂÂ <modelVersion>4.0.0</modelVersion>
ÂÂÂ <packaging>pom</packaging>
ÂÂÂ <groupId>myGroup</groupId>
ÂÂÂ <artifactId>packaging</artifactId>
ÂÂÂ <version>1.0.0-SNAPSHOT</version>
ÂÂÂ <dependencies>
ÂÂÂÂÂÂÂÂ <dependency>
ÂÂÂ ÂÂÂ ÂÂÂ <groupId>myGroup</groupId>
ÂÂÂ ÂÂÂ ÂÂÂ <artifactId>war.feature</artifactId>ÂÂÂ
ÂÂÂ ÂÂÂ ÂÂÂ <version>1.0.0-SNAPSHOT</version>
ÂÂÂ ÂÂÂ ÂÂÂ <type>war</type>
ÂÂÂ ÂÂÂ </dependency>
ÂÂÂ ÂÂÂ <dependency>
ÂÂÂ ÂÂÂ ÂÂÂ <groupId>myGroup</groupId>
ÂÂÂ ÂÂÂ ÂÂÂ <artifactId>documentation</artifactId>ÂÂÂ
ÂÂÂ ÂÂÂ ÂÂÂ <version>1.0.0-SNAPSHOT</version>
ÂÂÂ ÂÂÂ ÂÂÂ <type>zip</type>
ÂÂÂ ÂÂÂ </dependency>
ÂÂÂÂ </dependencies>
 Â <build>
...
...
ÂÂÂÂ </build>
</project>