Bug 1276729
Summary: | xmvn: buiddep MOJO should cope better with immutable or broken projects | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Michal Srb <msrb> |
Component: | xmvn | Assignee: | Mikolaj Izdebski <mizdebsk> |
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | rawhide | CC: | java-sig-commits, mat.booth, mizdebsk, msimacek, msrb |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | 2.5.0-5 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-11-26 13:44:19 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
Michal Srb
2015-10-30 16:25:07 UTC
Reproducible by running: xmvn -o -f core generate-sources org.fedoraproject.xmvn:xmvn-mojo:builddep XMvn fails to work with ANTLR plugin because it returns immutable collection, but XMvn expects mutable list. This is a bug in Maven ANTLR Plugin. Its MavenProject implementation in DependencyProjectStub.java is buggy and violates contract of MavenProject - many methods have no implementations (empty method body), some setters do nothing, some getters return different value on each call (even if object was not modified). I don't consider this as a bug in XMvn, but rather enhancement request - XMvn should cope better with immutable or buggy projects. Until this is implemented, I can suggest possible solutions/workarounds: 1. fix antlr-maven-plugin (note that upstream - Codehaus - is dead) 2. use a different plugin (eg. one from ANTLR upstream) 3. skip running builddep MOJO (requires calling xmvn manualy, not using %mvn_build) (In reply to Mikolaj Izdebski from comment #1) > XMvn fails to work with ANTLR plugin because it returns immutable > collection, but XMvn expects mutable list. This is a bug in Maven ANTLR > Plugin. Its MavenProject implementation in DependencyProjectStub.java is > buggy and violates contract of MavenProject - many methods have no > implementations (empty method body), some setters do nothing, some getters > return different value on each call (even if object was not modified). I just realized the above description is not correct - I was looking at wrong class. Still, the problem is caused by ANTLR plugin. antlr32 package suffers from this problem also: https://apps.fedoraproject.org/koschei/package/antlr32 For now, I will switch to manual invocation of xmvn as suggested in comment 1 Fixed in xmvn-2.5.0-5 I believe that this bug is fixed in xmvn-2.5.0-5, which is available in Fedora Rawhide, so I am closing this bug now. The build containing the fix can be found at Koji: http://koji.fedoraproject.org/koji/buildinfo?buildID=701753 |