Bug 1007498 - xmvn: adds scope test dependencies to requires in certain cases
xmvn: adds scope test dependencies to requires in certain cases
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: xmvn (Show other bugs)
rawhide
Unspecified Unspecified
high Severity high
: ---
: ---
Assigned To: Mikolaj Izdebski
Fedora Extras Quality Assurance
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-12 11:23 EDT by Stanislav Ochotnicky
Modified: 2013-09-13 07:28 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-13 07:28:51 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Stanislav Ochotnicky 2013-09-12 11:23:20 EDT
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 11:48:45 EDT
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 03:54:02 EDT
Same problem in plexus-compiler 2.3
Comment 3 Mikolaj Izdebski 2013-09-13 05:58:56 EDT
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 06:18:29 EDT
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 07:28:51 EDT
OK, closing as notabug. We'll just need to be extra carefult about pom-only packages

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