This is an automated email from the ASF dual-hosted git repository.
asf-gitbox-commits pushed a commit to branch support-ivy-as-component-source
in repository https://gitbox.apache.org/repos/asf/ant-antlibs-cyclonedx.git
The following commit(s) were added to
refs/heads/support-ivy-as-component-source by this push:
new 71cb7f8 use classloader task to load ivy into antlib
71cb7f8 is described below
commit 71cb7f865363b7aecd7213d10a2a172359631d1a
Author: Stefan Bodewig <[email protected]>
AuthorDate: Fri Aug 14 17:45:40 2026 +0200
use classloader task to load ivy into antlib
---
build.xml | 12 ++++--------
src/main/org/apache/ant/cyclonedx/Component.java | 2 +-
2 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/build.xml b/build.xml
index 4d5869a..b6825ea 100644
--- a/build.xml
+++ b/build.xml
@@ -48,19 +48,15 @@ under the License.
<condition property="add.ant.core.component">
<isset property="jdk9+"/>
</condition>
- <typedef uri="antlib:org.apache.ant.cyclonedx"
- resource="org/apache/ant/cyclonedx/antlib.xml"
- loaderRef="cdx.loader">
+ <classloader name="cdx.loader" parentName="antlib.classloader.ivy">
<classpath>
- <path refid="ivy.lib.path"/>
<path refid="classpath.compile"/>
<pathelement location="${jarname}"/>
</classpath>
- </typedef>
- <taskdef resource="org/apache/ivy/ant/antlib.xml"
- uri="antlib:org.apache.ivy.ant"
+ </classloader>
+ <typedef uri="antlib:org.apache.ant.cyclonedx"
+ resource="org/apache/ant/cyclonedx/antlib.xml"
loaderRef="cdx.loader"/>
- <ivy:resolve file="ivy.xml" xmlns:ivy="antlib:org.apache.ivy.ant"/>
</target>
<target name="antunit-test" depends="ready-to-test-with-antunit,resolve"
diff --git a/src/main/org/apache/ant/cyclonedx/Component.java
b/src/main/org/apache/ant/cyclonedx/Component.java
index f262e2a..4422009 100644
--- a/src/main/org/apache/ant/cyclonedx/Component.java
+++ b/src/main/org/apache/ant/cyclonedx/Component.java
@@ -1120,7 +1120,7 @@ public class Component extends DataType {
* an Ivy module descriptor. The Ivy file should already be resolved
* (i.e., ivy:resolve should have been run).</p>
*
- * @since CycloneDX Antlib 0.3
+ * @since CycloneDX Antlib 0.2
*/
public static class IvyModule {
private String conf;