Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 991454 - Maven fails to resolve zip type dependencies produced in reactor
Summary: Maven fails to resolve zip type dependencies produced in reactor
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: maven
Version: 20
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Mikolaj Izdebski
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 991923 992453
TreeView+ depends on / blocked
 
Reported: 2013-08-02 12:37 UTC by Severin Gehwolf
Modified: 2013-08-23 08:43 UTC (History)
7 users (show)

Fixed In Version: 3.1.0-7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-08-23 08:43:55 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Reproducer (680 bytes, application/x-bzip2)
2013-08-09 10:10 UTC, Mikolaj Izdebski
no flags Details

Description Severin Gehwolf 2013-08-02 12:37:16 UTC
Description of problem:
fedpkg build of thermostat fails for the master branch:
http://koji.fedoraproject.org/koji/taskinfo?taskID=5691209

Version-Release number of selected component (if applicable):
xmvn 0.5.1

How reproducible:
Always.

Steps to Reproduce:
1. fedpkg clone thermostat && fedpkg switch-branch master && fedpkg build

Actual results:
Fails to resolve *-distribution*.zip dependencies which are produced at an earlier stage during the build (plugin distribution modules produce them).

Expected results:
xmvn can resolve zip and distribution module passes build.

Comment 1 Mikolaj Izdebski 2013-08-09 10:07:28 UTC
For me this looks like incorrect usage of Maven by upstream.  Does thermostat build fine with upstream Maven 3.1.0?

I have prepared a minimal reproducer (attached). The project builds file with upstream maven Maven 3.0.5, but fails with 3.1.0, which shows that the approach used is incorrect.

Closing as WONTFIX because XMvn follows behavior of Maven and this behavior is expected.  You should report this bug upstream and work with them to make the project buildable with Maven 3.1.0.


$ mvn -V verify
Apache Maven 3.0.5 (rNON-CANONICAL_2013-05-20_14-11_mockbuild; 2013-05-20 16:11:33+0200)
Maven home: /usr/share/maven
Java version: 1.7.0_19, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.19.x86_64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.9.2-200.fc18.x86_64", arch: "amd64", family: "unix"
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] zip
[INFO] child
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building zip 1.0.0
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-assembly-plugin:2.2-beta-5:single (assemble) @ zip ---
[INFO] Reading assembly descriptor: zip.xml
[INFO] Building zip: /tmp/rep/target/zip-1.0.0.zip
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building child 1.0.0
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ child ---
[debug] execute contextualize
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /tmp/rep/child/src/main/resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ child ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ child ---
[debug] execute contextualize
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /tmp/rep/child/src/test/resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ child ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-surefire-plugin:2.10:test (default-test) @ child ---
[INFO] No tests to run.
[INFO] Surefire report directory: /tmp/rep/child/target/surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------

Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

[INFO] 
[INFO] --- maven-jar-plugin:2.3.2:jar (default-jar) @ child ---
[WARNING] JAR will be empty - no content was marked for inclusion!
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] zip ............................................... SUCCESS [1.274s]
[INFO] child ............................................. SUCCESS [0.946s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.351s
[INFO] Finished at: Fri Aug 09 12:01:21 CEST 2013
[INFO] Final Memory: 10M/171M
[INFO] ------------------------------------------------------------------------


$ mvn -V verify
Apache Maven 3.1.0 (NON-CANONICAL_2013-08-03_10-13_mockbuild; 2013-08-03 12:13:37+0200)
Maven home: /usr/share/maven
Java version: 1.7.0_25, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.25-2.3.12.3.fc20.x86_64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.9.2-200.fc18.x86_64", arch: "amd64", family: "unix"
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] zip
[INFO] child
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building zip 1.0.0
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-assembly-plugin:2.2-beta-5:single (assemble) @ zip ---
[INFO] Reading assembly descriptor: zip.xml
[INFO] Building zip: /tmp/rep/target/zip-1.0.0.zip
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building child 1.0.0
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] zip ............................................... SUCCESS [1.040s]
[INFO] child ............................................. FAILURE [0.057s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.229s
[INFO] Finished at: Fri Aug 09 12:00:39 CEST 2013
[INFO] Final Memory: 10M/172M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project child: Could not resolve dependencies for project org.fedoraproject.rhbz991454:child:jar:1.0.0: Failure to find org.fedoraproject.rhbz991454:zip:zip:1.0.0 in http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :child

Comment 2 Mikolaj Izdebski 2013-08-09 10:10:12 UTC
Created attachment 784786 [details]
Reproducer

Minimal reproducer

Comment 3 Simone Caronni 2013-08-09 12:27:13 UTC
Hello,

I have the same error on package guacamole-client; I thought it was related so I put dependency on here (#992453); but if I use normal maven the error does not occur and build succeed.

Log with %mvn_build or mvn-rpmbuild:

DEBUG: [INFO] ------------------------------------------------------------------------
DEBUG: [INFO] Reactor Build Order:
DEBUG: [INFO] 
DEBUG: [INFO] guacamole-common
DEBUG: [INFO] guacamole-ext
DEBUG: [INFO] guacamole-common-js
DEBUG: [INFO] guacamole
DEBUG: [INFO] guacamole-client
[...]
------------------------------------------------------------------------
DEBUG: [INFO] Building guacamole-common-js 0.7.3
DEBUG: [INFO] ------------------------------------------------------------------------
DEBUG: [INFO] 
DEBUG: [INFO] --- maven-assembly-plugin:2.4:attached (make-zip) @ guacamole-common-js ---
DEBUG: [INFO] Reading assembly descriptor: static.xml
DEBUG: [INFO] Building zip: /builddir/build/BUILD/guacamole-client-0.8.2/guacamole-common-js/target/guacamole-common-js-0.7.3.zip
DEBUG: [INFO]                                                                         
DEBUG: [INFO]
------------------------------------------------------------------------
DEBUG: [INFO] Building guacamole 0.8.2
DEBUG: [INFO]
------------------------------------------------------------------------
DEBUG: [INFO]
DEBUG: [INFO] ------------------------------------------------------------------------
DEBUG: [INFO] Skipping guacamole-client
DEBUG: [INFO] This project has been banned from the build due to previous failures.
DEBUG: [INFO] ------------------------------------------------------------------------
DEBUG: [INFO] ------------------------------------------------------------------------
DEBUG: [INFO] Reactor Summary:
DEBUG: [INFO] 
DEBUG: [INFO] guacamole-common .................................. SUCCESS [1.899s]
DEBUG: [INFO] guacamole-ext ..................................... SUCCESS [0.234s]
DEBUG: [INFO] guacamole-common-js ............................... SUCCESS [0.460s]
DEBUG: [INFO] guacamole ......................................... FAILURE [0.036s]
DEBUG: [INFO] guacamole-client .................................. SKIPPED
DEBUG: [INFO] ------------------------------------------------------------------------
DEBUG: [INFO] BUILD FAILURE
DEBUG: [INFO] ------------------------------------------------------------------------
DEBUG: [INFO] Total time: 3.413s
DEBUG: [INFO] Finished at: Fri Aug 09 14:07:56 CEST 2013
DEBUG: [INFO] Final Memory: 27M/344M
DEBUG: [INFO] ------------------------------------------------------------------------
DEBUG: [ERROR] Failed to execute goal on project guacamole: Could not resolve dependencies for project net.sourceforge.guacamole:guacamole:war:0.8.2: Cannot access guac-dev (http://guac-dev.org/repo) in offline mode and the artifact net.sourceforge.guacamole:guacamole-common-js:zip:0.7.3 has not been downloaded from it before. -> [Help 1]

Any pointer on why it could be possibly failing since last succesful rawhide build of 22nd July?

Thanks,
--Simone

Comment 4 Simone Caronni 2013-08-09 12:41:12 UTC
Build log here:

http://kojipkgs.fedoraproject.org//work/tasks/7936/5797936/build.log

Comment 5 Mikolaj Izdebski 2013-08-09 12:50:55 UTC
(In reply to Simone Caronni from comment #3)
> I have the same error on package guacamole-client; I thought it was related
> so I put dependency on here (#992453); but if I use normal maven the error
> does not occur and build succeed.

My suspicion is that the zip artifact was deployed by upstream to remote repository (Maven Central) and Maven is downloading it from there instead of resolving from reactor.  That's the reason the build works for you with Maven 3.1.0.

Try bumping artifact version and try rebuilding the project.  If my suspicion is correct guacamole-client should now fail to build with Maven 3.1.0 and work with 3.0.5.

Comment 6 Mikolaj Izdebski 2013-08-16 16:26:11 UTC
Forwarded upstream:
http://jira.codehaus.org/browse/MNG-5503

Comment 7 Mikolaj Izdebski 2013-08-23 08:00:31 UTC
Upstream has confirmed and fixed this issue.

Comment 8 Mikolaj Izdebski 2013-08-23 08:15:07 UTC
Fixed in maven-3.1.0-7

Comment 9 Mikolaj Izdebski 2013-08-23 08:43:55 UTC
I believe that this bug is fixed in maven-3.1.0-7,
which is available in Fedora 20, so I am closing this bug now.

The build containing the fix can be found at Koji:
http://koji.fedoraproject.org/koji/buildinfo?buildID=458482


Note You need to log in before you can comment on or make changes to this bug.