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

asf-gitbox-commits pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/ant-antlibs-cyclonedx.git


The following commit(s) were added to refs/heads/main by this push:
     new 7fc2f22  remove distributionbom for now
7fc2f22 is described below

commit 7fc2f22ae3ac2d67b0b4974432b2951368bf30fd
Author: Stefan Bodewig <[email protected]>
AuthorDate: Thu May 28 07:10:00 2026 +0200

    remove distributionbom for now
---
 build.xml                                    | 45 ++++++++++++++++++++++--
 src/main/org/apache/ant/cyclonedx/antlib.xml | 41 ----------------------
 src/tests/antunit/distributionbom-test.xml   | 52 +++++++++++++++++++++++++---
 3 files changed, 91 insertions(+), 47 deletions(-)

diff --git a/build.xml b/build.xml
index 24dcc88..cbfd245 100644
--- a/build.xml
+++ b/build.xml
@@ -286,6 +286,47 @@ under the License.
   </target>
 
   <target name="after-dist" depends="define-cyclonedx-components">
+    <macrodef name="distributionbom" backtrace="false">
+      <attribute name="version"/>
+      <attribute name="archiveName"/>
+      <attribute name="archiveUrl"/>
+      <attribute name="archiveLocation" default=""/>
+      <attribute name="outputDirectory"/>
+      <attribute name="description"/>
+      <attribute name="publisher"/>
+      <attribute name="componentType" default="file"/>
+      <attribute name="format" default="all"/>
+      <attribute name="useComponentSupplier" default="true"/>
+      <attribute name="supplierIsManufacturer" default="true"/>
+      <element name="archiveContent"/>
+      <element name="componentChildren" optional="true"/>
+      <element name="additionalBomContent" optional="true"/>
+      <sequential
+        xmlns:cdx="antlib:org.apache.ant.cyclonedx">
+        <cdx:componentbom
+            bomName="@{archiveName}.cyclonedx"
+            outputdirectory="@{outputDirectory}"
+            format="@{format}"
+            useComponentSupplier="@{useComponentSupplier}">
+          <component
+              version="@{version}"
+              purl="@{archiveUrl}"
+              name="@{archiveUrl}"
+              description="@{description}"
+              publisher="@{publisher}"
+              type="@{componentType}"
+              supplierIsManufacturer="@{supplierIsManufacturer}">
+            <file file="@{archiveLocation}"
+                  unless:blank="@{archiveLocation}" xmlns:unless="ant:unless"/>
+            <componentChildren/>
+          </component>
+          <pureFileComponents>
+            <archiveContent/>
+          </pureFileComponents>
+          <additionalBomContent/>
+        </cdx:componentbom>
+      </sequential>
+    </macrodef>
     <macrodef name="create-tarball-bom">
       <attribute name="distdir"/>
       <attribute name="distbase"/>
@@ -294,7 +335,7 @@ under the License.
       <attribute name="ext"/>
       <element name="moreComponentChildren" implicit="true" optional="true"/>
       <sequential>
-        <cdx:distributionbom
+        <distributionbom
             outputdirectory="@{distbase}"
             version="${artifact.version}"
             archiveName="${dist.name}-@{binsrc}.@{ext}"
@@ -318,7 +359,7 @@ under the License.
           <additionalBomContent>
             <license refid="apache-2"/>
           </additionalBomContent>
-        </cdx:distributionbom>
+        </distributionbom>
       </sequential>
     </macrodef>
     <macrodef name="create-tarball-boms">
diff --git a/src/main/org/apache/ant/cyclonedx/antlib.xml 
b/src/main/org/apache/ant/cyclonedx/antlib.xml
index 40a204d..33c442c 100644
--- a/src/main/org/apache/ant/cyclonedx/antlib.xml
+++ b/src/main/org/apache/ant/cyclonedx/antlib.xml
@@ -28,45 +28,4 @@ under the License.
     classname="org.apache.ant.cyclonedx.License"/>
   <typedef name="externalreferenceset"
     classname="org.apache.ant.cyclonedx.ExternalReferenceSet"/>
-
-  <macrodef name="distributionbom" backtrace="false">
-    <attribute name="version"/>
-    <attribute name="archiveName"/>
-    <attribute name="archiveUrl"/>
-    <attribute name="archiveLocation" default=""/>
-    <attribute name="outputDirectory"/>
-    <attribute name="description"/>
-    <attribute name="publisher"/>
-    <attribute name="componentType" default="file"/>
-    <attribute name="format" default="all"/>
-    <attribute name="useComponentSupplier" default="true"/>
-    <attribute name="supplierIsManufacturer" default="true"/>
-    <element name="archiveContent"/>
-    <element name="componentChildren" optional="true"/>
-    <element name="additionalBomContent" optional="true"/>
-    <sequential>
-      <cdx:componentbom
-          bomName="@{archiveName}.cyclonedx"
-          outputdirectory="@{outputDirectory}"
-          format="@{format}"
-          useComponentSupplier="@{useComponentSupplier}">
-        <component
-            version="@{version}"
-            purl="@{archiveUrl}"
-            name="@{archiveUrl}"
-            description="@{description}"
-            publisher="@{publisher}"
-            type="@{componentType}"
-            supplierIsManufacturer="@{supplierIsManufacturer}">
-          <file file="@{archiveLocation}"
-                unless:blank="@{archiveLocation}" xmlns:unless="ant:unless"/>
-          <componentChildren/>
-        </component>
-        <pureFileComponents>
-          <archiveContent/>
-        </pureFileComponents>
-        <additionalBomContent/>
-      </cdx:componentbom>
-    </sequential>
-  </macrodef>
 </antlib>
diff --git a/src/tests/antunit/distributionbom-test.xml 
b/src/tests/antunit/distributionbom-test.xml
index c92c84f..519268c 100644
--- a/src/tests/antunit/distributionbom-test.xml
+++ b/src/tests/antunit/distributionbom-test.xml
@@ -19,16 +19,60 @@
 
   <import file="shared.xml" />
 
+  <target name="setUp" depends="shared.setUp">
+    <!-- this is a candidate for becoming a atask of the Antlib but
+         things are a bit unstable right now -->
+    <macrodef name="distributionbom" backtrace="false">
+      <attribute name="version"/>
+      <attribute name="archiveName"/>
+      <attribute name="archiveUrl"/>
+      <attribute name="archiveLocation" default=""/>
+      <attribute name="outputDirectory"/>
+      <attribute name="description"/>
+      <attribute name="publisher"/>
+      <attribute name="componentType" default="file"/>
+      <attribute name="format" default="all"/>
+      <attribute name="useComponentSupplier" default="true"/>
+      <attribute name="supplierIsManufacturer" default="true"/>
+      <element name="archiveContent"/>
+      <element name="componentChildren" optional="true"/>
+      <element name="additionalBomContent" optional="true"/>
+      <sequential
+        xmlns:cdx="antlib:org.apache.ant.cyclonedx">
+        <cdx:componentbom
+            bomName="@{archiveName}.cyclonedx"
+            outputdirectory="@{outputDirectory}"
+            format="@{format}"
+            useComponentSupplier="@{useComponentSupplier}">
+          <component
+              version="@{version}"
+              purl="@{archiveUrl}"
+              name="@{archiveUrl}"
+              description="@{description}"
+              publisher="@{publisher}"
+              type="@{componentType}"
+              supplierIsManufacturer="@{supplierIsManufacturer}">
+            <file file="@{archiveLocation}"
+                  unless:blank="@{archiveLocation}" xmlns:unless="ant:unless"/>
+            <componentChildren/>
+          </component>
+          <pureFileComponents>
+            <archiveContent/>
+          </pureFileComponents>
+          <additionalBomContent/>
+        </cdx:componentbom>
+      </sequential>
+    </macrodef>
+  </target>
 
   <target name="testAntlibsSourceTarball" depends="commonReferences">
-    <cdx:distributionbom
+    <distributionbom
         version="${artifact.version}"
         archiveName="ant-cyclonedx-${artifact.version}-src.tar"
         archiveUrl="ant-cyclonedx-src.tar"
         description="Apache CycloneDX Antlib Source Distribution"
         publisher="The Apache Software Foundation"
-        outputdirectory="${output}"
-        xmlns:cdx="antlib:org.apache.ant.cyclonedx">
+        outputdirectory="${output}">
       <componentChildren>
         <supplier refid="ant-team"/>
         <license refid="apache-2"/>
@@ -47,7 +91,7 @@
       <additionalBomContent>
         <license refid="apache-2"/>
       </additionalBomContent>
-    </cdx:distributionbom>
+    </distributionbom>
     <copy todir="${java.io.tmpdir}">
       <fileset dir="${output}" includes="ant-cyclonedx*"/>
     </copy>

Reply via email to