Author: jhm
Date: Fri Jul  9 05:42:52 2010
New Revision: 962416

URL: http://svn.apache.org/viewvc?rev=962416&view=rev
Log:
Merge rat-report targets from build.xml and build-release.xml: Hudson must not 
fail on failing RAT report, because it would skip the publishing of that report.

Modified:
    ant/ivy/core/trunk/build-release.xml

Modified: ant/ivy/core/trunk/build-release.xml
URL: 
http://svn.apache.org/viewvc/ant/ivy/core/trunk/build-release.xml?rev=962416&r1=962415&r2=962416&view=diff
==============================================================================
--- ant/ivy/core/trunk/build-release.xml (original)
+++ ant/ivy/core/trunk/build-release.xml Fri Jul  9 05:42:52 2010
@@ -433,6 +433,7 @@
        </target>
        
        <target name="rat" depends="init-ivy">
+    <property name="rat.failOnError" value="true"/> 
         <ivy:cachepath organisation="org.apache.rat" module="apache-rat-tasks" 
revision="0.6" 
                        inline="true" conf="default" pathid="rat.classpath" 
                        log="download-only"/>
@@ -441,33 +442,35 @@
                     uri="antlib:org.apache.rat.anttasks"
                     classpathref="rat.classpath" />
 
-               <mkdir dir="${rat.report.dir}"/>
-           <rat:report xmlns:rat="antlib:org.apache.rat.anttasks" 
reportFile="${rat.report.dir}/rat-report.txt">
-             <fileset dir="${basedir}">
-               <exclude name=".classpath" />
-               <exclude name=".ivy2/**/*" />
-               <exclude name="build/**/*" />
-               <exclude name="**/*.sha1" />
+    <mkdir dir="${rat.report.dir}"/>
+      <rat:report xmlns:rat="antlib:org.apache.rat.anttasks" 
reportFile="${rat.report.dir}/rat-report.txt">
+        <fileset dir="${basedir}">
+          <exclude name=".classpath" />
+          <exclude name=".ivy2/**/*" />
+          <exclude name="build/**/*" />
+          <exclude name="**/*.sha1" />
             <exclude name="**/*.md5" />
-               <exclude name="**/*.txt" />
-               <exclude name="META-INF/MANIFEST.MF" />
-               <exclude name="**/*.json" />
+          <exclude name="**/*.txt" />
+          <exclude name="META-INF/MANIFEST.MF" />
+          <exclude name="**/*.json" />
             <exclude name="doc/config.js" />
             <exclude name="doc/js/jquery.pack.js" />
             <exclude name="doc/js/jquery.treeview.js" />
-               <exclude name="doc/xooki/tiddly/util.js" />
-             </fileset>
-           </rat:report>
+          <exclude name="doc/xooki/tiddly/util.js" />
+        </fileset>
+      </rat:report>
 
-               <fail message="Some files have missing or incorrect license 
information. Check RAT report for more details!">
-                       <condition>
-                           <not>
-                               <resourcecontains 
resource="${rat.report.dir}/rat-report.txt" substring="0 Unknown Licenses" 
casesensitive="false" /> 
-                           </not>
-                       </condition>
-               </fail>
-       </target>
-       
+    <fail message="Some files have missing or incorrect license information. 
Check RAT report for more details!">
+      <condition>
+        <and>
+          <not>
+              <resourcecontains resource="${rat.report.dir}/rat-report.txt" 
substring="0 Unknown Licenses" casesensitive="false" /> 
+          </not>
+          <equals arg1="${rat.failOnError}" arg2="true"/>
+        </and>
+      </condition>
+    </fail>
+  </target>    
        <target name="prepare-snapshot" 
                depends="/localivy, clean-ivy-home, clean, clean-lib, 
snapshot-version, install, clean-examples, coverage-report" />
        <target name="snapshot" 


Reply via email to