You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Oran Kelly (JIRA)" <ji...@codehaus.org> on 2009/07/09 13:23:23 UTC

[jira] Created: (MNG-4233) Artifact does not get resolved from the reactor

Artifact does not get resolved from the reactor
-----------------------------------------------

                 Key: MNG-4233
                 URL: http://jira.codehaus.org/browse/MNG-4233
             Project: Maven 2
          Issue Type: Bug
          Components: Artifacts and Repositories, Dependencies
    Affects Versions: 2.2.0, 2.1.0, 2.0.10, 2.0.9, 2.0.6
            Reporter: Oran Kelly
         Attachments: test-case.tar.gz

This issue is directly related to MNG-2877. That issue is marked as fixed in 2.0.6. However, I have a project which does pretty much what MNG-2877 describes (a sub-project using maven-dependency-plugin to unpack a jar created at an earlier stage in the reactor) and it is not working.

I have attached a simple project structure which displays the issue. I have tested this with Maven 2.0.6, 2.0.9, 2.0.10, 2.1.0 and 2.2.0 and it fails in them all.

I build this test project structure using:
rm -fr $HOME/.m2/repository/maven/test
mvn clean verify

(Using "clean verify" as this is what release:prepare does and is how I ran in to the problem).

The output from this run is

{noformat}
[INFO] Scanning for projects...
[WARNING] 
	Profile with id: 'dev' has not been activated.

[INFO] Reactor build order: 
[INFO]   Test Module
[INFO]   Test Module Core
[INFO]   Test Module Dep
[INFO] ------------------------------------------------------------------------
[INFO] Building Test Module
[INFO]    task-segment: [clean, verify]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean {execution: default-clean}]
[INFO] [site:attach-descriptor {execution: default-attach-descriptor}]
[INFO] ------------------------------------------------------------------------
[INFO] Building Test Module Core
[INFO]    task-segment: [clean, verify]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean {execution: default-clean}]
[INFO] [resources:resources {execution: default-resources}]
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /home/user/tmp/test-case/core/src/main/resources
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Compiling 1 source file to /home/user/tmp/test-case/core/target/classes
[INFO] [resources:testResources {execution: default-testResources}]
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /home/user/tmp/test-case/core/src/test/resources
[INFO] [compiler:testCompile {execution: default-testCompile}]
[INFO] No sources to compile
[INFO] [surefire:test {execution: default-test}]
[INFO] No tests to run.
[INFO] [jar:jar {execution: default-jar}]
[INFO] Building jar: /home/user/tmp/test-case/core/target/core-1.0.0-SNAPSHOT.jar
[INFO] ------------------------------------------------------------------------
[INFO] Building Test Module Dep
[INFO]    task-segment: [clean, verify]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean {execution: default-clean}]
[INFO] [resources:resources {execution: default-resources}]
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /home/user/tmp/test-case/dep/src/main/resources
[INFO] [dependency:unpack {execution: unpack}]
[INFO] Configured Artifact: maven.test:core:1.0.0-SNAPSHOT:jar
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.

GroupId: maven.test
ArtifactId: core
Version: 1.0.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=maven.test -DartifactId=core -Dversion=1.0.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file

Alternatively, if you host your own repository you can deploy the file there: 
    mvn deploy:deploy-file -DgroupId=maven.test -DartifactId=core -Dversion=1.0.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]


  maven.test:core:jar:1.0.0-SNAPSHOT

from the specified remote repositories:
  central (http://repo1.maven.org/maven2)
{noformat}



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-4233) Artifact does not get resolved from the reactor

Posted by "Oran Kelly (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-4233?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=187971#action_187971 ] 

Oran Kelly commented on MNG-4233:
---------------------------------

unpack-dependencies will unpack transitive dependencies as well. So if you add any dependencies to the core module in my test case, they will also be unpacked. So using unpack-dependencies is not really a valid work-around except for in this most simple of test cases.

Your example throws up a very interesting question: why on Earth is unpack-dependencies able to resolve the artifact from the reactor and not unpack? Surely they are using the same dependency resolution mechanism? The sole difference between the two appears to be that one unpacks only direct dependencies, the other unpacks direct and transitive dependencies.

I have checked and the same problem exists with copy and copy-dependencies; copy is unable to resolve the artifact, copy-dependencies is.

> Artifact does not get resolved from the reactor
> -----------------------------------------------
>
>                 Key: MNG-4233
>                 URL: http://jira.codehaus.org/browse/MNG-4233
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Artifacts and Repositories, Dependencies
>    Affects Versions: 2.0.6, 2.0.9, 2.0.10, 2.1.0, 2.2.0
>            Reporter: Oran Kelly
>         Attachments: test-case.tar.gz
>
>
> This issue is directly related to MNG-2877. That issue is marked as fixed in 2.0.6. However, I have a project which does pretty much what MNG-2877 describes (a sub-project using maven-dependency-plugin to unpack a jar created at an earlier stage in the reactor) and it is not working.
> I have attached a simple project structure which displays the issue. I have tested this with Maven 2.0.6, 2.0.9, 2.0.10, 2.1.0 and 2.2.0 and it fails in them all.
> I build this test project structure using:
> rm -fr $HOME/.m2/repository/maven/test
> mvn clean verify
> (Using "clean verify" as this is what release:prepare does and is how I ran in to the problem).
> The output from this run is
> {noformat}
> [INFO] Scanning for projects...
> [WARNING] 
> 	Profile with id: 'dev' has not been activated.
> [INFO] Reactor build order: 
> [INFO]   Test Module
> [INFO]   Test Module Core
> [INFO]   Test Module Dep
> [INFO] ------------------------------------------------------------------------
> [INFO] Building Test Module
> [INFO]    task-segment: [clean, verify]
> [INFO] ------------------------------------------------------------------------
> [INFO] [clean:clean {execution: default-clean}]
> [INFO] [site:attach-descriptor {execution: default-attach-descriptor}]
> [INFO] ------------------------------------------------------------------------
> [INFO] Building Test Module Core
> [INFO]    task-segment: [clean, verify]
> [INFO] ------------------------------------------------------------------------
> [INFO] [clean:clean {execution: default-clean}]
> [INFO] [resources:resources {execution: default-resources}]
> [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
> [INFO] skip non existing resourceDirectory /home/user/tmp/test-case/core/src/main/resources
> [INFO] [compiler:compile {execution: default-compile}]
> [INFO] Compiling 1 source file to /home/user/tmp/test-case/core/target/classes
> [INFO] [resources:testResources {execution: default-testResources}]
> [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
> [INFO] skip non existing resourceDirectory /home/user/tmp/test-case/core/src/test/resources
> [INFO] [compiler:testCompile {execution: default-testCompile}]
> [INFO] No sources to compile
> [INFO] [surefire:test {execution: default-test}]
> [INFO] No tests to run.
> [INFO] [jar:jar {execution: default-jar}]
> [INFO] Building jar: /home/user/tmp/test-case/core/target/core-1.0.0-SNAPSHOT.jar
> [INFO] ------------------------------------------------------------------------
> [INFO] Building Test Module Dep
> [INFO]    task-segment: [clean, verify]
> [INFO] ------------------------------------------------------------------------
> [INFO] [clean:clean {execution: default-clean}]
> [INFO] [resources:resources {execution: default-resources}]
> [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
> [INFO] skip non existing resourceDirectory /home/user/tmp/test-case/dep/src/main/resources
> [INFO] [dependency:unpack {execution: unpack}]
> [INFO] Configured Artifact: maven.test:core:1.0.0-SNAPSHOT:jar
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Failed to resolve artifact.
> GroupId: maven.test
> ArtifactId: core
> Version: 1.0.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=maven.test -DartifactId=core -Dversion=1.0.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file
> Alternatively, if you host your own repository you can deploy the file there: 
>     mvn deploy:deploy-file -DgroupId=maven.test -DartifactId=core -Dversion=1.0.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
>   maven.test:core:jar:1.0.0-SNAPSHOT
> from the specified remote repositories:
>   central (http://repo1.maven.org/maven2)
> {noformat}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-4233) Artifact does not get resolved from the reactor

Posted by "Basil James Whitehouse III (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-4233?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=187794#action_187794 ] 

Basil James Whitehouse III commented on MNG-4233:
-------------------------------------------------

This is with:
$ mvn --version
Maven version: 2.0.9
Java version: 1.6.0_14
OS name: "linux" version: "2.6.28-15-generic" arch: "i386" Family: "unix"



> Artifact does not get resolved from the reactor
> -----------------------------------------------
>
>                 Key: MNG-4233
>                 URL: http://jira.codehaus.org/browse/MNG-4233
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Artifacts and Repositories, Dependencies
>    Affects Versions: 2.0.6, 2.0.9, 2.0.10, 2.1.0, 2.2.0
>            Reporter: Oran Kelly
>         Attachments: test-case.tar.gz
>
>
> This issue is directly related to MNG-2877. That issue is marked as fixed in 2.0.6. However, I have a project which does pretty much what MNG-2877 describes (a sub-project using maven-dependency-plugin to unpack a jar created at an earlier stage in the reactor) and it is not working.
> I have attached a simple project structure which displays the issue. I have tested this with Maven 2.0.6, 2.0.9, 2.0.10, 2.1.0 and 2.2.0 and it fails in them all.
> I build this test project structure using:
> rm -fr $HOME/.m2/repository/maven/test
> mvn clean verify
> (Using "clean verify" as this is what release:prepare does and is how I ran in to the problem).
> The output from this run is
> {noformat}
> [INFO] Scanning for projects...
> [WARNING] 
> 	Profile with id: 'dev' has not been activated.
> [INFO] Reactor build order: 
> [INFO]   Test Module
> [INFO]   Test Module Core
> [INFO]   Test Module Dep
> [INFO] ------------------------------------------------------------------------
> [INFO] Building Test Module
> [INFO]    task-segment: [clean, verify]
> [INFO] ------------------------------------------------------------------------
> [INFO] [clean:clean {execution: default-clean}]
> [INFO] [site:attach-descriptor {execution: default-attach-descriptor}]
> [INFO] ------------------------------------------------------------------------
> [INFO] Building Test Module Core
> [INFO]    task-segment: [clean, verify]
> [INFO] ------------------------------------------------------------------------
> [INFO] [clean:clean {execution: default-clean}]
> [INFO] [resources:resources {execution: default-resources}]
> [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
> [INFO] skip non existing resourceDirectory /home/user/tmp/test-case/core/src/main/resources
> [INFO] [compiler:compile {execution: default-compile}]
> [INFO] Compiling 1 source file to /home/user/tmp/test-case/core/target/classes
> [INFO] [resources:testResources {execution: default-testResources}]
> [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
> [INFO] skip non existing resourceDirectory /home/user/tmp/test-case/core/src/test/resources
> [INFO] [compiler:testCompile {execution: default-testCompile}]
> [INFO] No sources to compile
> [INFO] [surefire:test {execution: default-test}]
> [INFO] No tests to run.
> [INFO] [jar:jar {execution: default-jar}]
> [INFO] Building jar: /home/user/tmp/test-case/core/target/core-1.0.0-SNAPSHOT.jar
> [INFO] ------------------------------------------------------------------------
> [INFO] Building Test Module Dep
> [INFO]    task-segment: [clean, verify]
> [INFO] ------------------------------------------------------------------------
> [INFO] [clean:clean {execution: default-clean}]
> [INFO] [resources:resources {execution: default-resources}]
> [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
> [INFO] skip non existing resourceDirectory /home/user/tmp/test-case/dep/src/main/resources
> [INFO] [dependency:unpack {execution: unpack}]
> [INFO] Configured Artifact: maven.test:core:1.0.0-SNAPSHOT:jar
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Failed to resolve artifact.
> GroupId: maven.test
> ArtifactId: core
> Version: 1.0.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=maven.test -DartifactId=core -Dversion=1.0.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file
> Alternatively, if you host your own repository you can deploy the file there: 
>     mvn deploy:deploy-file -DgroupId=maven.test -DartifactId=core -Dversion=1.0.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
>   maven.test:core:jar:1.0.0-SNAPSHOT
> from the specified remote repositories:
>   central (http://repo1.maven.org/maven2)
> {noformat}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-4233) Artifact does not get resolved from the reactor

Posted by "Basil James Whitehouse III (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-4233?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=187793#action_187793 ] 

Basil James Whitehouse III commented on MNG-4233:
-------------------------------------------------

I just verified that that this worked by:
* downloading the attached test case
* running as described
* getting the same error
* change the dep/pom.xml to use {{unpack-dependencies}} instead of {{unpack}}
* run again as described (including the rm of the local repo)
* no error, see log below

{code}
$ rm -fr $HOME/.m2/repository/maven/test
$ mvn clean verify
[INFO] Scanning for projects...
[INFO] Reactor build order: 
[INFO]   Test Module
[INFO]   Test Module Core
[INFO]   Test Module Dep
[INFO] ------------------------------------------------------------------------
[INFO] Building Test Module
[INFO]    task-segment: [clean, verify]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] [site:attach-descriptor]
[INFO] ------------------------------------------------------------------------
[INFO] Building Test Module Core
[INFO]    task-segment: [clean, verify]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] Deleting directory /home/basil/downloads/test-case/core/target
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] Compiling 1 source file to /home/basil/downloads/test-case/core/target/classes
[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:testCompile]
[INFO] No sources to compile
[INFO] [surefire:test]
[INFO] No tests to run.
[INFO] [jar:jar]
[INFO] Building jar: /home/basil/downloads/test-case/core/target/core-1.0.0-SNAPSHOT.jar
[INFO] ------------------------------------------------------------------------
[INFO] Building Test Module Dep
[INFO]    task-segment: [clean, verify]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] Deleting directory /home/basil/downloads/test-case/dep/target
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [dependency:unpack-dependencies {execution: unpack}]
[INFO] Unpacking /home/basil/downloads/test-case/core/target/core-1.0.0-SNAPSHOT.jarto
 /home/basil/downloads/test-case/dep/target/dependency
with Includes null and excludes:null
[INFO] [compiler:compile]
[INFO] No sources to compile
[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:testCompile]
[INFO] No sources to compile
[INFO] [surefire:test]
[INFO] No tests to run.
[INFO] [jar:jar]
[WARNING] JAR will be empty - no content was marked for inclusion!
[INFO] Building jar: /home/basil/downloads/test-case/dep/target/dep-1.0.0-SNAPSHOT.jar
[INFO] 
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] ------------------------------------------------------------------------
[INFO] Test Module ........................................... SUCCESS [2.871s]
[INFO] Test Module Core ...................................... SUCCESS [2.184s]
[INFO] Test Module Dep ....................................... SUCCESS [3.673s]
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 9 seconds
[INFO] Finished at: Thu Aug 20 15:06:58 GMT 2009
[INFO] Final Memory: 18M/36M
[INFO] ------------------------------------------------------------------------
{code}

> Artifact does not get resolved from the reactor
> -----------------------------------------------
>
>                 Key: MNG-4233
>                 URL: http://jira.codehaus.org/browse/MNG-4233
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Artifacts and Repositories, Dependencies
>    Affects Versions: 2.0.6, 2.0.9, 2.0.10, 2.1.0, 2.2.0
>            Reporter: Oran Kelly
>         Attachments: test-case.tar.gz
>
>
> This issue is directly related to MNG-2877. That issue is marked as fixed in 2.0.6. However, I have a project which does pretty much what MNG-2877 describes (a sub-project using maven-dependency-plugin to unpack a jar created at an earlier stage in the reactor) and it is not working.
> I have attached a simple project structure which displays the issue. I have tested this with Maven 2.0.6, 2.0.9, 2.0.10, 2.1.0 and 2.2.0 and it fails in them all.
> I build this test project structure using:
> rm -fr $HOME/.m2/repository/maven/test
> mvn clean verify
> (Using "clean verify" as this is what release:prepare does and is how I ran in to the problem).
> The output from this run is
> {noformat}
> [INFO] Scanning for projects...
> [WARNING] 
> 	Profile with id: 'dev' has not been activated.
> [INFO] Reactor build order: 
> [INFO]   Test Module
> [INFO]   Test Module Core
> [INFO]   Test Module Dep
> [INFO] ------------------------------------------------------------------------
> [INFO] Building Test Module
> [INFO]    task-segment: [clean, verify]
> [INFO] ------------------------------------------------------------------------
> [INFO] [clean:clean {execution: default-clean}]
> [INFO] [site:attach-descriptor {execution: default-attach-descriptor}]
> [INFO] ------------------------------------------------------------------------
> [INFO] Building Test Module Core
> [INFO]    task-segment: [clean, verify]
> [INFO] ------------------------------------------------------------------------
> [INFO] [clean:clean {execution: default-clean}]
> [INFO] [resources:resources {execution: default-resources}]
> [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
> [INFO] skip non existing resourceDirectory /home/user/tmp/test-case/core/src/main/resources
> [INFO] [compiler:compile {execution: default-compile}]
> [INFO] Compiling 1 source file to /home/user/tmp/test-case/core/target/classes
> [INFO] [resources:testResources {execution: default-testResources}]
> [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
> [INFO] skip non existing resourceDirectory /home/user/tmp/test-case/core/src/test/resources
> [INFO] [compiler:testCompile {execution: default-testCompile}]
> [INFO] No sources to compile
> [INFO] [surefire:test {execution: default-test}]
> [INFO] No tests to run.
> [INFO] [jar:jar {execution: default-jar}]
> [INFO] Building jar: /home/user/tmp/test-case/core/target/core-1.0.0-SNAPSHOT.jar
> [INFO] ------------------------------------------------------------------------
> [INFO] Building Test Module Dep
> [INFO]    task-segment: [clean, verify]
> [INFO] ------------------------------------------------------------------------
> [INFO] [clean:clean {execution: default-clean}]
> [INFO] [resources:resources {execution: default-resources}]
> [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
> [INFO] skip non existing resourceDirectory /home/user/tmp/test-case/dep/src/main/resources
> [INFO] [dependency:unpack {execution: unpack}]
> [INFO] Configured Artifact: maven.test:core:1.0.0-SNAPSHOT:jar
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Failed to resolve artifact.
> GroupId: maven.test
> ArtifactId: core
> Version: 1.0.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=maven.test -DartifactId=core -Dversion=1.0.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file
> Alternatively, if you host your own repository you can deploy the file there: 
>     mvn deploy:deploy-file -DgroupId=maven.test -DartifactId=core -Dversion=1.0.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
>   maven.test:core:jar:1.0.0-SNAPSHOT
> from the specified remote repositories:
>   central (http://repo1.maven.org/maven2)
> {noformat}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (MNG-4233) Artifact does not get resolved from the reactor

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-4233?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Bentmann closed MNG-4233.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 3.0-alpha-3
         Assignee: Benjamin Bentmann

> Artifact does not get resolved from the reactor
> -----------------------------------------------
>
>                 Key: MNG-4233
>                 URL: http://jira.codehaus.org/browse/MNG-4233
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Artifacts and Repositories, Dependencies
>    Affects Versions: 2.0.6, 2.0.9, 2.0.10, 2.1.0, 2.2.0
>            Reporter: Oran Kelly
>            Assignee: Benjamin Bentmann
>             Fix For: 3.0-alpha-3
>
>         Attachments: test-case.tar.gz
>
>
> This issue is directly related to MNG-2877. That issue is marked as fixed in 2.0.6. However, I have a project which does pretty much what MNG-2877 describes (a sub-project using maven-dependency-plugin to unpack a jar created at an earlier stage in the reactor) and it is not working.
> I have attached a simple project structure which displays the issue. I have tested this with Maven 2.0.6, 2.0.9, 2.0.10, 2.1.0 and 2.2.0 and it fails in them all.
> I build this test project structure using:
> rm -fr $HOME/.m2/repository/maven/test
> mvn clean verify
> (Using "clean verify" as this is what release:prepare does and is how I ran in to the problem).
> The output from this run is
> {noformat}
> [INFO] Scanning for projects...
> [WARNING] 
> 	Profile with id: 'dev' has not been activated.
> [INFO] Reactor build order: 
> [INFO]   Test Module
> [INFO]   Test Module Core
> [INFO]   Test Module Dep
> [INFO] ------------------------------------------------------------------------
> [INFO] Building Test Module
> [INFO]    task-segment: [clean, verify]
> [INFO] ------------------------------------------------------------------------
> [INFO] [clean:clean {execution: default-clean}]
> [INFO] [site:attach-descriptor {execution: default-attach-descriptor}]
> [INFO] ------------------------------------------------------------------------
> [INFO] Building Test Module Core
> [INFO]    task-segment: [clean, verify]
> [INFO] ------------------------------------------------------------------------
> [INFO] [clean:clean {execution: default-clean}]
> [INFO] [resources:resources {execution: default-resources}]
> [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
> [INFO] skip non existing resourceDirectory /home/user/tmp/test-case/core/src/main/resources
> [INFO] [compiler:compile {execution: default-compile}]
> [INFO] Compiling 1 source file to /home/user/tmp/test-case/core/target/classes
> [INFO] [resources:testResources {execution: default-testResources}]
> [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
> [INFO] skip non existing resourceDirectory /home/user/tmp/test-case/core/src/test/resources
> [INFO] [compiler:testCompile {execution: default-testCompile}]
> [INFO] No sources to compile
> [INFO] [surefire:test {execution: default-test}]
> [INFO] No tests to run.
> [INFO] [jar:jar {execution: default-jar}]
> [INFO] Building jar: /home/user/tmp/test-case/core/target/core-1.0.0-SNAPSHOT.jar
> [INFO] ------------------------------------------------------------------------
> [INFO] Building Test Module Dep
> [INFO]    task-segment: [clean, verify]
> [INFO] ------------------------------------------------------------------------
> [INFO] [clean:clean {execution: default-clean}]
> [INFO] [resources:resources {execution: default-resources}]
> [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
> [INFO] skip non existing resourceDirectory /home/user/tmp/test-case/dep/src/main/resources
> [INFO] [dependency:unpack {execution: unpack}]
> [INFO] Configured Artifact: maven.test:core:1.0.0-SNAPSHOT:jar
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Failed to resolve artifact.
> GroupId: maven.test
> ArtifactId: core
> Version: 1.0.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=maven.test -DartifactId=core -Dversion=1.0.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file
> Alternatively, if you host your own repository you can deploy the file there: 
>     mvn deploy:deploy-file -DgroupId=maven.test -DartifactId=core -Dversion=1.0.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
>   maven.test:core:jar:1.0.0-SNAPSHOT
> from the specified remote repositories:
>   central (http://repo1.maven.org/maven2)
> {noformat}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-4233) Artifact does not get resolved from the reactor

Posted by "Basil James Whitehouse III (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-4233?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=187790#action_187790 ] 

Basil James Whitehouse III commented on MNG-4233:
-------------------------------------------------

I think the problem is in the using dependency:unpack.  I had this problem before and it took some close reading to figure it out.  From the unpack goals documentation: "Goal that retrieves a list of artifacts from the repository and unpacks them in a defined location."  This goal needs to have the artifact in the local repo.  I switched to using dependency:unpack-dependencies since it works within the reactor/multimodule build.

> Artifact does not get resolved from the reactor
> -----------------------------------------------
>
>                 Key: MNG-4233
>                 URL: http://jira.codehaus.org/browse/MNG-4233
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Artifacts and Repositories, Dependencies
>    Affects Versions: 2.0.6, 2.0.9, 2.0.10, 2.1.0, 2.2.0
>            Reporter: Oran Kelly
>         Attachments: test-case.tar.gz
>
>
> This issue is directly related to MNG-2877. That issue is marked as fixed in 2.0.6. However, I have a project which does pretty much what MNG-2877 describes (a sub-project using maven-dependency-plugin to unpack a jar created at an earlier stage in the reactor) and it is not working.
> I have attached a simple project structure which displays the issue. I have tested this with Maven 2.0.6, 2.0.9, 2.0.10, 2.1.0 and 2.2.0 and it fails in them all.
> I build this test project structure using:
> rm -fr $HOME/.m2/repository/maven/test
> mvn clean verify
> (Using "clean verify" as this is what release:prepare does and is how I ran in to the problem).
> The output from this run is
> {noformat}
> [INFO] Scanning for projects...
> [WARNING] 
> 	Profile with id: 'dev' has not been activated.
> [INFO] Reactor build order: 
> [INFO]   Test Module
> [INFO]   Test Module Core
> [INFO]   Test Module Dep
> [INFO] ------------------------------------------------------------------------
> [INFO] Building Test Module
> [INFO]    task-segment: [clean, verify]
> [INFO] ------------------------------------------------------------------------
> [INFO] [clean:clean {execution: default-clean}]
> [INFO] [site:attach-descriptor {execution: default-attach-descriptor}]
> [INFO] ------------------------------------------------------------------------
> [INFO] Building Test Module Core
> [INFO]    task-segment: [clean, verify]
> [INFO] ------------------------------------------------------------------------
> [INFO] [clean:clean {execution: default-clean}]
> [INFO] [resources:resources {execution: default-resources}]
> [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
> [INFO] skip non existing resourceDirectory /home/user/tmp/test-case/core/src/main/resources
> [INFO] [compiler:compile {execution: default-compile}]
> [INFO] Compiling 1 source file to /home/user/tmp/test-case/core/target/classes
> [INFO] [resources:testResources {execution: default-testResources}]
> [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
> [INFO] skip non existing resourceDirectory /home/user/tmp/test-case/core/src/test/resources
> [INFO] [compiler:testCompile {execution: default-testCompile}]
> [INFO] No sources to compile
> [INFO] [surefire:test {execution: default-test}]
> [INFO] No tests to run.
> [INFO] [jar:jar {execution: default-jar}]
> [INFO] Building jar: /home/user/tmp/test-case/core/target/core-1.0.0-SNAPSHOT.jar
> [INFO] ------------------------------------------------------------------------
> [INFO] Building Test Module Dep
> [INFO]    task-segment: [clean, verify]
> [INFO] ------------------------------------------------------------------------
> [INFO] [clean:clean {execution: default-clean}]
> [INFO] [resources:resources {execution: default-resources}]
> [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
> [INFO] skip non existing resourceDirectory /home/user/tmp/test-case/dep/src/main/resources
> [INFO] [dependency:unpack {execution: unpack}]
> [INFO] Configured Artifact: maven.test:core:1.0.0-SNAPSHOT:jar
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Failed to resolve artifact.
> GroupId: maven.test
> ArtifactId: core
> Version: 1.0.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=maven.test -DartifactId=core -Dversion=1.0.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file
> Alternatively, if you host your own repository you can deploy the file there: 
>     mvn deploy:deploy-file -DgroupId=maven.test -DartifactId=core -Dversion=1.0.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
>   maven.test:core:jar:1.0.0-SNAPSHOT
> from the specified remote repositories:
>   central (http://repo1.maven.org/maven2)
> {noformat}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira