Bug 988561 - apache-rat build fails with mvn-build, works with mvn-rpmbuild
apache-rat build fails with mvn-build, works with mvn-rpmbuild
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: apache-rat (Show other bugs)
19
All Linux
unspecified Severity medium
: ---
: ---
Assigned To: Mikolaj Izdebski
Fedora Extras Quality Assurance
:
Depends On: 988977
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-25 16:13 EDT by Orion Poplawski
Modified: 2013-10-03 08:50 EDT (History)
6 users (show)

See Also:
Fixed In Version: 0.10-2
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-10-03 08:50:03 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 Orion Poplawski 2013-07-25 16:13:29 EDT
Description of problem:

Trying to switch the apache-rat build to use %mvn_build.  It fails with:

[INFO] RAT Ant Tasks ..................................... FAILURE [0.971s]
[INFO] RAT Application ................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10.031s
[INFO] Finished at: Thu Jul 25 14:11:16 MDT 2013
[INFO] Final Memory: 111M/440M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (default) on project apache-rat-tasks: An Ant BuildException has occured: The following error occurred while executing this line:
[ERROR] /export/home/orion/fedora/apache-rat/apache-rat-0.8/apache-rat-tasks/src/test/resources/antunit/report-bad-configurations.xml:41: Problem: failed to create task or type antlib:org.apache.ant.antunit:antunit
[ERROR] Cause: The name is undefined.
[ERROR] Action: Check the spelling.
[ERROR] Action: Check that any custom tasks/types have been declared.
[ERROR] Action: Check that any <presetdef>/<macrodef> declarations have taken place.
[ERROR] No types or tasks have been defined in this namespace yet
[ERROR]
[ERROR] This appears to be an antlib declaration.
[ERROR] Action: Check that the implementing library exists in one of:
[ERROR] -ANT_HOME/lib
[ERROR] -the IDE Ant configuration dialogs
[ERROR]
[ERROR] around Ant part ...<ant antfile="src/test/resources/antunit/report-bad-configurations.xml" inheritRefs="false" inheritAll="false">... @ 4:114 in /export/home/orion/fedora/apache-rat/apache-rat-0.8/apache-rat-tasks/target/antrun/build-main.xml
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :apache-rat-tasks

Version-Release number of selected component (if applicable):
xmvn-0.5.0-5.fc19.noarch
Comment 1 Mat Booth 2013-08-15 10:11:25 EDT
This looks like a packaging bug in ant-antunit...

The config file /etc/ant-antunit.d/antunit looks wrong, this file should be installed as /etc/ant.d/antunit and the jar should be installed as /usr/share/java/ant/ant-antunit.jar
Comment 2 Orion Poplawski 2013-08-15 14:11:21 EDT
Hmm, while there were undoubtedly problems with ant-antunit (hopefully fixed in rawhide), that wasn't the whole story.  At this point I'm thinking it's mostly an apache-rat issue, but I may need to get bug 988977 fixed first.
Comment 3 Mat Booth 2013-08-16 11:58:11 EDT
Could be worth updating to latest version 0.10 of rat:

http://svn.apache.org/repos/asf/creadur/rat/tags/apache-rat-project-0.10/

Looks like only 0.9 is in rawhide.
Comment 4 Orion Poplawski 2013-08-16 12:08:45 EDT
Hmm, they haven't yet updated the web page to say it is released, but yeah, worth a try.
Comment 5 Mikolaj Izdebski 2013-10-03 08:07:14 EDT
The problem was that test scripts invoked by maven-antrun-plugin from module apache-rat-tasks were depending on maven.test.skip property. This property was not defined with mvn-rpmbuild, but %mvn_build -f defined it to true.

As the problematic scripts are used for running tests only and tests are skipped anyways (because of incompatibility with Maven 3), the solution is to remove execution of maven-antrun-plugin from apache-rat-tasks.
Comment 6 Mikolaj Izdebski 2013-10-03 08:40:12 EDT
Fixed in apache-rat-0.10-2
Comment 7 Mikolaj Izdebski 2013-10-03 08:50:03 EDT
I believe that this bug is fixed in apache-rat-0.10-2,
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=469202

This bug was fixed in the next release of Fedora, and is not planned
to be fixed in the release it was filed against.  If you want this bug
to be fixed in updates for Fedora 19, please say so in a comment.
Otherwise you can update to the newer release of Fedora to get the fix.

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