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
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
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.
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.
Hmm, they haven't yet updated the web page to say it is released, but yeah, worth a try.
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.
Fixed in apache-rat-0.10-2
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.