Bug 1029995

Summary: plexus-compiler: FTBFS - requires generator problem
Product: Red Hat Enterprise Linux 7 Reporter: Stanislav Ochotnicky <sochotni>
Component: plexus-compilerAssignee: Mikolaj Izdebski <mizdebsk>
Status: CLOSED CURRENTRELEASE QA Contact: Jan Kepler <jkejda>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: jkejda, mizdebsk, redhatbugs, riehecky, sochotni, tis
Target Milestone: rcKeywords: Patch
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 2.2-6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-13 12:22:38 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:
Attachments:
Description Flags
Proposed patch none

Description Stanislav Ochotnicky 2013-11-13 16:32:50 UTC
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 17:02:39 UTC
Created attachment 823563 [details]
Proposed patch

Comment 4 Mikolaj Izdebski 2013-11-13 17:57:10 UTC
Fixed in plexus-compiler-2.2-6

Comment 7 Stanislav Ochotnicky 2014-01-14 15:08:03 UTC
*** Bug 1053002 has been marked as a duplicate of this bug. ***

Comment 8 Zenon Panoussis 2014-01-30 12:08:58 UTC
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 12:18:02 UTC
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 13:55:15 UTC
Right after %mvn_install. It worked. Thanks!

Comment 11 Ludek Smid 2014-06-13 12:22:38 UTC
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.