Bug 988561 - apache-rat build fails with mvn-build, works with mvn-rpmbuild
Summary: apache-rat build fails with mvn-build, works with mvn-rpmbuild
Alias: None
Product: Fedora
Classification: Fedora
Component: apache-rat
Version: 19
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Mikolaj Izdebski
QA Contact: Fedora Extras Quality Assurance
Depends On: 988977
TreeView+ depends on / blocked
Reported: 2013-07-25 20:13 UTC by Orion Poplawski
Modified: 2013-10-03 12:50 UTC (History)
6 users (show)

Fixed In Version: 0.10-2
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2013-10-03 12:50:03 UTC

Attachments (Terms of Use)

Description Orion Poplawski 2013-07-25 20:13:29 UTC
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] ------------------------------------------------------------------------
[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] This appears to be an antlib declaration.
[ERROR] Action: Check that the implementing library exists in one of:
[ERROR] -the IDE Ant configuration dialogs
[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] 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] 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] 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):

Comment 1 Mat Booth 2013-08-15 14:11:25 UTC
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 18:11:21 UTC
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 15:58:11 UTC
Could be worth updating to latest version 0.10 of rat:


Looks like only 0.9 is in rawhide.

Comment 4 Orion Poplawski 2013-08-16 16:08:45 UTC
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 12:07:14 UTC
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 12:40:12 UTC
Fixed in apache-rat-0.10-2

Comment 7 Mikolaj Izdebski 2013-10-03 12:50:03 UTC
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:

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.