This is an automated email from the ASF dual-hosted git repository.

joshtynjala pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit 3608a8d1c690efe3fba510e4daf4ed232502a56b
Author: Josh Tynjala <[email protected]>
AuthorDate: Fri Feb 27 10:16:32 2026 -0800

    ApproveRoyale.xml: don't require ANT_HOME environment variable, and 
download Apache Rat JARs to basedir when they're not found
    
    On both macOS and Linux, I've been forced to use sudo in a terminal to 
manually copy the Apache Rat JARs into env.ANT_HOME, so the approval script 
always fails when the JARs are missing. Instead, if the script doesn't find the 
Rat JARs, it should simply download them into  instead of env.ANT_HOME. This 
will make it easier for PMCs to use the approval script.
    
    However, if ANT_HOME is configured, this path will still be searched for 
previously copied JAR files. This will allow PMCs to keep using the script the 
old way, if they're already set up. I made sure that specifying ANT_HOME 
without the Rat JARs present won't fail either.
---
 ApproveRoyale.xml | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/ApproveRoyale.xml b/ApproveRoyale.xml
index 22963cc560..9160be4db5 100644
--- a/ApproveRoyale.xml
+++ b/ApproveRoyale.xml
@@ -84,9 +84,6 @@
        <condition property="do.copy.downloads" >
                <isset property="download.cache.dir" /> 
        </condition>
-       
-    <fail message="The ANT_HOME environment variable is not set."
-        unless="env.ANT_HOME"/>
                
     <target name="check-flash" if="use-flash">
         <available file="${env.AIR_HOME}"
@@ -111,6 +108,12 @@
             unless="FLASHPLAYER_DEBUGGER"/>
     </target>
         
+    <available file="${basedir}/${apache.rat.jar}"
+        type="file"
+        property="apache.rat.found"/>
+    <available file="${basedir}/${apache.rat.tasks.jar}"
+        type="file"
+        property="apache.rat.tasks.found"/>
     <available file="${env.ANT_HOME}/lib/${apache.rat.jar}"
         type="file"
         property="apache.rat.found"/>
@@ -183,10 +186,10 @@
        
        <target name="install-rat" 
depends="install-rat.jar,install-rat.tasks.jar" />
        <target name="install-rat.jar" unless="apache.rat.found">
-               <get src="${apache.rat.url}/${apache.rat.jar}" 
dest="${env.ANT_HOME}/lib/${apache.rat.jar}" />
+               <get src="${apache.rat.url}/${apache.rat.jar}" 
dest="${basedir}/${apache.rat.jar}" />
        </target>
        <target name="install-rat.tasks.jar" unless="apache.rat.tasks.found">
-               <get src="${apache.rat.tasks.url}/${apache.rat.tasks.jar}" 
dest="${env.ANT_HOME}/lib/${apache.rat.tasks.jar}" />
+               <get src="${apache.rat.tasks.url}/${apache.rat.tasks.jar}" 
dest="${basedir}/${apache.rat.tasks.jar}" />
        </target>
        
     <target name="rat-taskdef" description="Rat taskdef">
@@ -194,6 +197,8 @@
             uri="antlib:org.apache.rat.anttasks"
             resource="org/apache/rat/anttasks/antlib.xml">
             <classpath>
+                <pathelement location="${basedir}/${apache.rat.jar}"/>
+                <pathelement location="${basedir}/${apache.rat.tasks.jar}"/>
                 <pathelement location="${env.ANT_HOME}/lib/${apache.rat.jar}"/>
                 <pathelement 
location="${env.ANT_HOME}/lib/${apache.rat.tasks.jar}"/>
             </classpath>

Reply via email to