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/flex-blazeds.git
The following commit(s) were added to refs/heads/develop by this push:
new f341dbb ApproveBlazeDS.xml: don't require ANT_HOME environment
variable, and download Apache Rat JARs to basedir when they're not found
f341dbb is described below
commit f341dbb695c654d47267327e167f835b14f93631
Author: Josh Tynjala <[email protected]>
AuthorDate: Fri Feb 27 09:56:42 2026 -0800
ApproveBlazeDS.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 ${basedir} 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.
---
ApproveBlazeDS.xml | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/ApproveBlazeDS.xml b/ApproveBlazeDS.xml
index 33129f7..c450e03 100644
--- a/ApproveBlazeDS.xml
+++ b/ApproveBlazeDS.xml
@@ -77,9 +77,12 @@
<isset property="download.cache.dir"/>
</condition>
- <fail message="The ANT_HOME environment variable is not set."
- unless="env.ANT_HOME"/>
-
+ <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"/>
@@ -131,10 +134,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">
@@ -142,6 +145,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>
@@ -155,7 +160,7 @@
<target name="main-no-download"
depends="write-out-jars-list,install-rat,uncompress,rat-check,binary-rat,check-notices,examine-jars,build,approve"
- description="Perform required release approval steps without
download (src and bin archives must already exist in same directory)">
+ description="Perform required release approval steps">
</target>
<target name="display-text">