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-antlibs-antunit.git

commit 41852f7f6fea7c9ba106e04609511f7a0e45b659
Author: Stefan Bodewig <[email protected]>
AuthorDate: Fri Jun 5 08:34:27 2026 +0200

    learned a nicer way to download build-time dependencies while working on Ivy
---
 cyclonedx.xml | 24 +++++++++++-------------
 ivy.xml       |  2 --
 2 files changed, 11 insertions(+), 15 deletions(-)

diff --git a/cyclonedx.xml b/cyclonedx.xml
index 9bd4851..40698c8 100644
--- a/cyclonedx.xml
+++ b/cyclonedx.xml
@@ -20,12 +20,6 @@ under the License.
 <project name="cyclonedx" xmlns:ivy="antlib:org.apache.ivy.ant">
 
   <target name="define-cyclonedx-components" depends="fetch-cyclonedx">
-    <typedef uri="antlib:org.apache.ant.cyclonedx"
-      resource="org/apache/ant/cyclonedx/antlib.xml">
-      <classpath>
-        <path refid="classpath.build"/>
-      </classpath>
-    </typedef>
     <!-- common definitions for SBOMs -->
     <cdx:organization
         name="Apache Ant Project Management Committee"
@@ -344,12 +338,16 @@ under the License.
     </create-tarball-boms>
   </target>
 
-  <target name="fetch-cyclonedx" depends="resolve,-no-fetch-cyclonedx" 
if="with.ivy">
-    <ivy:retrieve conf="build" 
pattern="${lib.dir.build}/[artifact]-[revision].[ext]" sync="yes"/>
-    <ivy:cachepath pathid="classpath.build" conf="build"/>
-  </target>
-
-  <target name="-no-fetch-cyclonedx" unless="with.ivy">
-    <path id="classpath.build"/>
+  <target name="fetch-cyclonedx" depends="resolve" if="with.ivy">
+    <ivy:cachepath organisation="org.apache.ant"
+                   module="ant-cyclonedx"
+                   revision="0.1"
+                   inline="true"
+                   conf="default"
+                   pathid="cyclonedx.classpath"
+                   log="download-only"/>
+    <typedef uri="antlib:org.apache.ant.cyclonedx"
+             resource="org/apache/ant/cyclonedx/antlib.xml"
+             classpathref="cyclonedx.classpath"/>
   </target>
 </project>
diff --git a/ivy.xml b/ivy.xml
index 5fa7ef9..baf3474 100644
--- a/ivy.xml
+++ b/ivy.xml
@@ -37,7 +37,6 @@
     <conf name="default" description="full antlib with all dependencies"/>
     <conf name="provided" description="Ant must be present at runtime"/>
     <conf name="test" description="dependencies used for JUnit tests of the 
antlib" transitive="false" visibility="private"/>
-    <conf name="build" description="dependencies used during the build 
process" visibility="private"/>
   </configurations>
   <publications xmlns:e="urn:ant.apache.org:ivy-extras">
     <artifact name="${artifact.name}" type="pom" ext="pom"/>
@@ -69,6 +68,5 @@
     <dependency org="junit" name="junit" rev="4.13.2" conf="default"/>
     <dependency org="org.apache.ant" name="ant" rev="1.10.13" 
conf="provided->default"/>
     <dependency org="org.apache.ant" name="ant-testutil" rev="1.10.13" 
conf="test->default"/>
-    <dependency org="org.apache.ant" name="ant-cyclonedx" rev="0.1" 
conf="build->default"/>
   </dependencies>
 </ivy-module>

Reply via email to