Bug 1029995 - plexus-compiler: FTBFS - requires generator problem
plexus-compiler: FTBFS - requires generator problem
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: plexus-compiler (Show other bugs)
7.0
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Mikolaj Izdebski
Jan Kepler
: Patch
: 1053002 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-13 11:32 EST by Stanislav Ochotnicky
Modified: 2014-06-18 03:50 EDT (History)
6 users (show)

See Also:
Fixed In Version: 2.2-6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-06-13 08:22:38 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)
Proposed patch (1.57 KB, patch)
2013-11-13 12:02 EST, Mikolaj Izdebski
no flags Details | Diff

  None (edit)
Description Stanislav Ochotnicky 2013-11-13 11:32:50 EST
plexus-compiler fails to build from source due to unresolvable dependencies for requires generator which fails the build to prevent incorrect package dependencies[1]. 

Snippet from build.log:

Exception: Following dependencies were not resolved and requires cannot be generated. Either remove the dependency from pom.xml or add proper packages to BuildRequires:
org.apache.maven.plugins:maven-gpg-plugin:::UNKNOWN
org.codehaus.plexus:plexus-compiler-test:::UNKNOWN
Following dependencies were not resolved and requires cannot be generated. Either remove the dependency from pom.xml or add proper packages to BuildRequires:
org.apache.maven.plugins:maven-gpg-plugin:::UNKNOWN
org.codehaus.plexus:plexus-compiler-test:::UNKNOWN


[1] https://brewweb.devel.redhat.com/taskinfo?taskID=6572303
Comment 2 Mikolaj Izdebski 2013-11-13 12:02:39 EST
Created attachment 823563 [details]
Proposed patch
Comment 4 Mikolaj Izdebski 2013-11-13 12:57:10 EST
Fixed in plexus-compiler-2.2-6
Comment 7 Stanislav Ochotnicky 2014-01-14 10:08:03 EST
*** Bug 1053002 has been marked as a duplicate of this bug. ***
Comment 8 Zenon Panoussis 2014-01-30 07:08:58 EST
Rebuilding with the 2.2-6 patch I get 

Exception: Following dependencies were not resolved and requires cannot be generated. Either remove the dependency from pom.xml or add proper packages to BuildRequires:
org.codehaus.plexus:plexus-compiler:pom::UNKNOWN
Following dependencies were not resolved and requires cannot be generated. Either remove the dependency from pom.xml or add proper packages to BuildRequires:
org.codehaus.plexus:plexus-compiler:pom::UNKNOWN

Indeed, it pulled in itself in pre-build:

DEBUG util.py:281:    plexus-compiler.noarch 0:2.2-5.el7

It's a loop because plexus-compiler buildrequires plexus-compiler-extras, which in turn requires mvn(org.codehaus.plexus:plexus-compiler-api), which is provided by plexus-compiler. 

How did you work around this to get it to build without an explicit Buildrequires: plexus-compiler?
Comment 9 Mikolaj Izdebski 2014-01-30 07:18:02 EST
You can try temporarly patching fragment file with sed (see below). Once you build plexus-compiler, rebuild it without this workaround.

sed -i -n '/<autoRequires>/{:a;N;/<\/autoRequires>/{p;b;};/>UNKNOWN</{:b;n;/<\/autoRequires>/{b;};bb;};ba;};p' %{buildroot}%{_mavendepmapfragdir}/*
Comment 10 Zenon Panoussis 2014-01-30 08:55:15 EST
Right after %mvn_install. It worked. Thanks!
Comment 11 Ludek Smid 2014-06-13 08:22:38 EDT
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.

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