You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Varghese C V <vc...@zafinlabs.com> on 2007/05/18 13:50:20 UTC

Re: dependency:unpack is not checking reactor artifacts for dependencies

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] 
------------------------------------------------------------------------
*********************************************************************************