This is an automated email from the ASF dual-hosted git repository.
asf-gitbox-commits pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ant.git
The following commit(s) were added to refs/heads/master by this push:
new 40a2f0248 Java 9+ is required when building SBOMs
40a2f0248 is described below
commit 40a2f0248e3c8cff7ed1e1fb1151ce2043079121
Author: Stefan Bodewig <[email protected]>
AuthorDate: Sun Jul 26 17:31:42 2026 +0200
Java 9+ is required when building SBOMs
---
build.xml | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/build.xml b/build.xml
index c76f8ca2f..66bff9415 100644
--- a/build.xml
+++ b/build.xml
@@ -622,6 +622,17 @@
else="">
<not><isset property="withDoclint"/></not>
</condition>
+
+ <condition property="cyclonedx.antlib.present">
+ <and>
+ <available
+ classname="org.apache.ant.cyclonedx.ComponentBomTask"
+ classpathref="classpath"
+ ignoresystemclasses="${ignoresystemclasses}"/>
+ <!-- https://github.com/CycloneDX/cyclonedx-core-java/issues/848 -->
+ <isset property="jdk9+"/>
+ </and>
+ </condition>
</target>
<!--
@@ -2228,11 +2239,9 @@ ${antunit.reports}
CycloneDX targets - create SBOMs
===================================================================
-->
- <available property="cyclonedx.antlib.present"
- classname="org.apache.ant.cyclonedx.ComponentBomTask"
- classpathref="classpath"
ignoresystemclasses="${ignoresystemclasses}"/>
-
- <target name="-init-cyclonedx" if="cyclonedx.antlib.present">
+ <target name="-init-cyclonedx"
+ depends="check-optional-packages"
+ if="cyclonedx.antlib.present">
<typedef uri="antlib:org.apache.ant.cyclonedx"
resource="org/apache/ant/cyclonedx/antlib.xml">
<classpath refid="classpath"/>