Bug 1007498

Summary: xmvn: adds scope test dependencies to requires in certain cases
Product: [Fedora] Fedora Reporter: Stanislav Ochotnicky <sochotni>
Component: xmvnAssignee: Mikolaj Izdebski <mizdebsk>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: high    
Version: rawhideCC: mizdebsk, msrb, sochotni, tradej
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-13 11:28:51 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Stanislav Ochotnicky 2013-09-12 15:23:20 UTC
Description of problem:
For latest build of google-guice[1], XMvn produced automatic requires on <scope>test</scope> dependency that cannot be satisified.


http://koji.fedoraproject.org/koji/rpminfo?rpmID=4399841

Comment 1 Stanislav Ochotnicky 2013-09-12 15:48:45 UTC
Note that this is likely related to the fact that extensions have scope test dependency on artifact which is resolved by reactor.

Comment 2 Michal Srb 2013-09-13 07:54:02 UTC
Same problem in plexus-compiler 2.3

Comment 3 Mikolaj Izdebski 2013-09-13 09:58:56 UTC
The problematic package (guice-extensions) is a POM-only package.
Test dependencies are expected to be included in this case.

Test dependencies are removed from effective POM during build because tests are skipped (%mvn_build -f).  However auto-requires are generated from raw POM, which still contains test dependency.  I think that this is expected -- if a package that directly or transitively requires this parent POM (i.e. some offspring POM) then this test dependency should be installed as we assume that tests are enabled by default and this offspring POM needs this dependency to build with tests enabled.

If there is a bogus auto-requires then most likely invalid dependencies should be removed from POM before building the package.  If this POM is not needed by any other package (like in case of google-guice-extensions) then installation of that POM can be skipped (%mvn_packafe [...] __noinstall).

I don't consider this as a bug in XMvn unless you can show me a different case with unexpected requires.

Comment 4 Mikolaj Izdebski 2013-09-13 10:18:29 UTC
The same commentary applies to org.codehaus.plexus:plexus-compilers - it's a POM, which is needed only by its offspring modules during build.  Test dependency is expected in this case.

Comment 5 Stanislav Ochotnicky 2013-09-13 11:28:51 UTC
OK, closing as notabug. We'll just need to be extra carefult about pom-only packages