I have a parent project which has two modules 'my-app' and 'my-dep-app'
(both created by the archetype-create example). The 'my-dep-app' project
wants the 'my-app' dependency to be unpacked into its target\classes
folder. I am trying to merge the classes of multiple model projects
before I can run the jibx xml binding compiler on them. This way I need
only one jibx binding factory for a group of related models.
The error 'Failed to resolve artifact' and the fact that it works when
installed in the local repository suggests that reactor artifacts are
not checked to resolve the dependency. Is this a multi-module problem?
I would like to point out that looks very similar to a resolved
dependency plugin issue (http://jira.codehaus.org/browse/MDEP-44),
except that I dont use the assembly plugin as shown in the test case.
Any help is appreciated.
Maven : 2.0.6
Maven dependency plugin : 2.0 alpha 4
This is the output I get. PFA the poms(Zip attachments are getting rejected)
*********************************************************************************
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO] my-app
[INFO] my-dep-app
[INFO] My-apps parent pom
[INFO]
----------------------------------------------------------------------------
[INFO] Building my-app
[INFO] task-segment: [package]
[INFO]
----------------------------------------------------------------------------
...
[INFO] [jar:jar]
[INFO] Building jar:
C:\test\mvn\dependency-unpack-test\my-app\target\my-app-1.0-SNAPSHOT.jar
[INFO]
----------------------------------------------------------------------------
[INFO] Building my-dep-app
[INFO] task-segment: [package]
[INFO]
----------------------------------------------------------------------------
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [dependency:unpack {execution: default}]
[INFO] Configured Artifact: com.mycomp.app:my-app:?:jar
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Failed to resolve artifact.
GroupId: com.mycomp.app
ArtifactId: my-app
Version: 1.0-SNAPSHOT
Reason: Unable to download the artifact from any repository
Try downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=com.mycomp.app -DartifactId=my-app \
-Dversion=1.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file
com.mycomp.app:my-app:jar:1.0-SNAPSHOT
from the specified remote repositories:
central (http://repo1.maven.org/maven2)
[INFO]
------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 4 seconds
[INFO] Finished at: Fri May 18 15:32:07 GST 2007
[INFO] Final Memory: 7M/13M
[INFO]
------------------------------------------------------------------------
*********************************************************************************
<project>
<groupId>com.zafinlabs.project.miRevenue.hdfc.impl</groupId>
<modelVersion>4.0.0</modelVersion>
<artifactId>myApps</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>My-apps parent pom</name>
<modules>
<module>my-app</module>
<module>my-dep-app</module>
</modules>
</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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycomp.app</groupId>
<artifactId>my-app</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>my-app</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
</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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycomp.app</groupId>
<artifactId>my-dep-app</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>my-dep-app</name>
<url>http://maven.apache.org</url>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.mycomp.app</groupId>
<artifactId>my-app</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.mycomp.app</groupId>
<artifactId>my-app</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<phase>process-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>com.mycomp.app</groupId>
<artifactId>my-app</artifactId>
<outputDirectory>target/classes</outputDirectory>
<overWrite>true</overWrite>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]