You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bo...@apache.org on 2026/08/16 10:56:39 UTC
(ant-antlibs-cyclonedx) 02/02: add license external references from Ivy modules
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
commit 82d209320ec14679b649047ca8bc04c592de82cb
Author: Stefan Bodewig <bo...@apache.org>
AuthorDate: Sun Aug 16 12:56:06 2026 +0200
add license external references from Ivy modules
---
example/ant-cyclonedx-0.2alpha.cdx.diff | 196 +++++++++++++--------
example/ant-cyclonedx-0.2alpha.cdx.json | 32 ++--
example/ant-cyclonedx-0.2alpha.ivy.cdx.json | 100 +++++++++--
.../ant/cyclonedx/IvyModuleComponentResolver.java | 14 ++
4 files changed, 238 insertions(+), 104 deletions(-)
diff --git a/example/ant-cyclonedx-0.2alpha.cdx.diff b/example/ant-cyclonedx-0.2alpha.cdx.diff
index a20a143..735bb7e 100644
--- a/example/ant-cyclonedx-0.2alpha.cdx.diff
+++ b/example/ant-cyclonedx-0.2alpha.cdx.diff
@@ -1,6 +1,6 @@
---- ant-cyclonedx-0.2alpha.cdx.json 2026-08-16 09:31:45.900940846 +0200
-+++ ant-cyclonedx-0.2alpha.ivy.cdx.json 2026-08-16 09:31:48.698014904 +0200
-@@ -253,36 +253,64 @@
+--- ant-cyclonedx-0.2alpha.cdx.json 2026-08-16 12:54:15.035134147 +0200
++++ ant-cyclonedx-0.2alpha.ivy.cdx.json 2026-08-16 12:54:22.467055136 +0200
+@@ -253,36 +253,68 @@
"components" : [
{
"type" : "library",
@@ -65,11 +65,14 @@
{
- "type" : "vcs",
- "url" : "https://github.com/wrandelshofer/FastDoubleParser/tree/master"
-- },
-- {
- "type" : "website",
-- "url" : "https://github.com/wrandelshofer/FastDoubleParser"
++ "type" : "website",
+ "url" : "https://github.com/ethlo/itu"
+ },
+ {
+- "type" : "website",
+- "url" : "https://github.com/wrandelshofer/FastDoubleParser"
++ "type" : "license",
++ "url" : "https://www.apache.org/licenses/LICENSE-2.0.txt"
}
]
},
@@ -80,7 +83,7 @@
"group" : "com.fasterxml.jackson.core",
"name" : "jackson-annotations",
"version" : "2.22",
-@@ -324,38 +352,22 @@
+@@ -324,38 +356,26 @@
"licenses" : [
{
"license" : {
@@ -103,14 +106,16 @@
- {
"type" : "website",
"url" : "https://github.com/FasterXML/jackson"
-- },
-- {
+ },
+ {
- "type" : "bom",
- "url" : "https://repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-annotations/2.22/jackson-annotations-2.22-sbom-cyclonedx.json"
- },
- {
- "type" : "distribution-intake",
- "url" : "https://central.sonatype.com/api/v1/publisher"
++ "type" : "license",
++ "url" : "https://www.apache.org/licenses/LICENSE-2.0.txt"
}
]
},
@@ -121,7 +126,7 @@
"group" : "com.fasterxml.jackson.core",
"name" : "jackson-core",
"version" : "2.22.1",
-@@ -397,38 +409,22 @@
+@@ -397,38 +417,26 @@
"licenses" : [
{
"license" : {
@@ -144,14 +149,16 @@
- {
"type" : "website",
"url" : "https://github.com/FasterXML/jackson-core"
-- },
-- {
+ },
+ {
- "type" : "bom",
- "url" : "https://repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-core/2.22.1/jackson-core-2.22.1-sbom-cyclonedx.json"
- },
- {
- "type" : "distribution-intake",
- "url" : "https://central.sonatype.com/api/v1/publisher"
++ "type" : "license",
++ "url" : "https://www.apache.org/licenses/LICENSE-2.0.txt"
}
]
},
@@ -162,7 +169,7 @@
"group" : "com.fasterxml.jackson.core",
"name" : "jackson-databind",
"version" : "2.22.1",
-@@ -470,38 +466,22 @@
+@@ -470,38 +478,26 @@
"licenses" : [
{
"license" : {
@@ -185,14 +192,16 @@
- {
"type" : "website",
"url" : "https://github.com/FasterXML/jackson"
-- },
-- {
+ },
+ {
- "type" : "bom",
- "url" : "https://repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-databind/2.22.1/jackson-databind-2.22.1-sbom-cyclonedx.json"
- },
- {
- "type" : "distribution-intake",
- "url" : "https://central.sonatype.com/api/v1/publisher"
++ "type" : "license",
++ "url" : "https://www.apache.org/licenses/LICENSE-2.0.txt"
}
]
},
@@ -203,7 +212,7 @@
"group" : "com.fasterxml.jackson.dataformat",
"name" : "jackson-dataformat-xml",
"version" : "2.22.1",
-@@ -543,31 +523,73 @@
+@@ -543,31 +539,81 @@
"licenses" : [
{
"license" : {
@@ -220,6 +229,12 @@
- "url" : "http://github.com/FasterXML/jackson-dataformat-xml"
+ "type" : "website",
+ "url" : "https://github.com/FasterXML/jackson-dataformat-xml"
+ },
+ {
+- "type" : "issue-tracker",
+- "url" : "https://github.com/FasterXML/jackson-dataformat-xml/issues"
++ "type" : "license",
++ "url" : "http://www.apache.org/licenses/LICENSE-2.0.txt"
+ }
+ ]
+ },
@@ -236,38 +251,34 @@
+ "content" : "8348dc064a58fb2ae67371764b634812"
},
{
-- "type" : "issue-tracker",
-- "url" : "https://github.com/FasterXML/jackson-dataformat-xml/issues"
-+ "alg" : "SHA-1",
-+ "content" : "af5fde2414e4a8d2617e7890f7068c26b5b66a33"
- },
- {
- "type" : "website",
- "url" : "https://github.com/FasterXML/jackson-dataformat-xml"
++ "alg" : "SHA-1",
++ "content" : "af5fde2414e4a8d2617e7890f7068c26b5b66a33"
++ },
++ {
+ "alg" : "SHA-256",
+ "content" : "cc3a0e540791a9a1cbcd7584767b84572ffda0b72823856558f47dea69ae8ed1"
- },
- {
-- "type" : "bom",
-- "url" : "https://repo1.maven.org/maven2/com/fasterxml/jackson/dataformat/jackson-dataformat-xml/2.22.1/jackson-dataformat-xml-2.22.1-sbom-cyclonedx.json"
++ },
++ {
+ "alg" : "SHA-512",
+ "content" : "12398c493aa3b54716813a6297b72104fa52ab324bae54512e41a1285ac756fcbb800084c088f8e9d3aceae2e698ca164bc547421d5fe2fb62ed2dadf1d3d000"
+ },
+ {
+ "alg" : "SHA3-256",
+ "content" : "2d33856e0e0aa27571950d57227a66ab78f22c5cecf7c07afc3ad4dbe3b4b4ae"
- },
- {
-- "type" : "distribution-intake",
-- "url" : "https://central.sonatype.com/api/v1/publisher"
++ },
++ {
+ "alg" : "SHA3-512",
+ "content" : "47bdf965089a1949286216aed3b286d8990a3b9169dacb15f0a6f36df07ee397d0ecbcc1294228479068cdbff4b1d8a11718ad5efa744952c34eb092e62cf644"
+ },
+ {
+ "alg" : "SHA-384",
+ "content" : "2f20d92e2fc1932406055a055e0602c9d0a96d7c19b75aeb7dca7c19b30e65bd126677a9bb855ef493be8f4be1feaf62"
-+ },
-+ {
+ },
+ {
+- "type" : "bom",
+- "url" : "https://repo1.maven.org/maven2/com/fasterxml/jackson/dataformat/jackson-dataformat-xml/2.22.1/jackson-dataformat-xml-2.22.1-sbom-cyclonedx.json"
+ "alg" : "SHA3-384",
+ "content" : "e0bc342c2bcd8d91b674657a28e0a762d68232729d7a53d0c04ba63807a1f6bc458bfb64c422408f0cb701ce753ff7cd"
+ }
@@ -285,10 +296,16 @@
+ {
+ "type" : "website",
+ "url" : "https://github.com/FasterXML/jackson-dataformats-text"
+ },
+ {
+- "type" : "distribution-intake",
+- "url" : "https://central.sonatype.com/api/v1/publisher"
++ "type" : "license",
++ "url" : "https://www.apache.org/licenses/LICENSE-2.0.txt"
}
]
},
-@@ -616,11 +638,17 @@
+@@ -616,11 +662,21 @@
{
"license" : {
"id" : "Apache-2.0",
@@ -303,12 +320,16 @@
+ {
+ "type" : "website",
+ "url" : "https://github.com/FasterXML/woodstox"
++ },
++ {
++ "type" : "license",
++ "url" : "http://www.apache.org/licenses/LICENSE-2.0.txt"
+ }
+ ]
},
{
"type" : "library",
-@@ -628,7 +656,7 @@
+@@ -628,7 +684,7 @@
"group" : "com.github.package-url",
"name" : "packageurl-java",
"version" : "1.5.0",
@@ -317,7 +338,7 @@
"hashes" : [
{
"alg" : "MD5",
-@@ -671,97 +699,11 @@
+@@ -671,97 +727,15 @@
}
}
],
@@ -410,14 +431,17 @@
- ],
- "purl" : "pkg:maven/com.jcraft/jsch@0.1.55?type=jar",
- "externalReferences" : [
-- {
++ "url" : "https://github.com/package-url/packageurl-java"
++ },
+ {
- "type" : "website",
- "url" : "http://www.jcraft.com/"
-+ "url" : "https://github.com/package-url/packageurl-java"
++ "type" : "license",
++ "url" : "https://opensource.org/licenses/MIT"
}
]
},
-@@ -810,16 +752,21 @@
+@@ -810,16 +784,25 @@
{
"license" : {
"id" : "Apache-2.0",
@@ -432,6 +456,10 @@
+ {
+ "type" : "website",
+ "url" : "https://github.com/networknt/json-schema-validator"
++ },
++ {
++ "type" : "license",
++ "url" : "https://www.apache.org/licenses/LICENSE-2.0"
+ }
+ ]
},
@@ -442,7 +470,7 @@
"group" : "commons-codec",
"name" : "commons-codec",
"version" : "1.22.1",
-@@ -862,46 +809,21 @@
+@@ -862,46 +845,25 @@
{
"license" : {
"id" : "Apache-2.0",
@@ -464,8 +492,8 @@
- {
"type" : "website",
"url" : "https://commons.apache.org/proper/commons-codec/"
-- },
-- {
+ },
+ {
- "type" : "bom",
- "url" : "https://repo1.maven.org/maven2/commons-codec/commons-codec/1.22.1/commons-codec-1.22.1-cyclonedx.json"
- },
@@ -480,6 +508,8 @@
- {
- "type" : "build-system",
- "url" : "https://github.com/apache/commons-codec/actions"
++ "type" : "license",
++ "url" : "https://www.apache.org/licenses/LICENSE-2.0.txt"
}
]
},
@@ -490,7 +520,7 @@
"group" : "commons-io",
"name" : "commons-io",
"version" : "2.22.0",
-@@ -944,39 +866,15 @@
+@@ -944,39 +906,19 @@
{
"license" : {
"id" : "Apache-2.0",
@@ -512,8 +542,8 @@
- {
"type" : "website",
"url" : "https://commons.apache.org/proper/commons-io/"
-- },
-- {
+ },
+ {
- "type" : "bom",
- "url" : "https://repo1.maven.org/maven2/commons-io/commons-io/2.22.0/commons-io-2.22.0-cyclonedx.json"
- },
@@ -528,10 +558,12 @@
- {
- "type" : "build-system",
- "url" : "https://github.com/apache/commons-io/actions"
++ "type" : "license",
++ "url" : "https://www.apache.org/licenses/LICENSE-2.0.txt"
}
]
},
-@@ -993,6 +891,40 @@
+@@ -993,6 +935,40 @@
"group" : "org.apache.ant",
"name" : "ant-launcher",
"version" : "1.10.17",
@@ -572,7 +604,7 @@
"licenses" : [
{
"license" : {
-@@ -1066,6 +998,40 @@
+@@ -1066,6 +1042,40 @@
"group" : "org.apache.ant",
"name" : "ant",
"version" : "1.10.17",
@@ -613,7 +645,7 @@
"licenses" : [
{
"license" : {
-@@ -1128,24 +1094,7 @@
+@@ -1128,24 +1138,7 @@
},
{
"type" : "library",
@@ -638,7 +670,7 @@
"group" : "org.apache.commons",
"name" : "commons-collections4",
"version" : "4.5.0",
-@@ -1188,62 +1137,21 @@
+@@ -1188,62 +1181,25 @@
{
"license" : {
"id" : "Apache-2.0",
@@ -660,8 +692,8 @@
- {
"type" : "website",
"url" : "https://commons.apache.org/proper/commons-collections/"
-- },
-- {
+ },
+ {
- "type" : "bom",
- "url" : "https://repo1.maven.org/maven2/org/apache/commons/commons-collections4/4.5.0/commons-collections4-4.5.0-cyclonedx.json"
- },
@@ -676,6 +708,8 @@
- {
- "type" : "build-system",
- "url" : "https://github.com/apache/commons-parent/actions"
++ "type" : "license",
++ "url" : "https://www.apache.org/licenses/LICENSE-2.0.txt"
}
]
},
@@ -702,7 +736,7 @@
"group" : "org.apache.commons",
"name" : "commons-lang3",
"version" : "3.20.0",
-@@ -1286,77 +1194,22 @@
+@@ -1286,77 +1242,26 @@
{
"license" : {
"id" : "Apache-2.0",
@@ -724,8 +758,8 @@
- {
"type" : "website",
"url" : "https://commons.apache.org/proper/commons-lang/"
-- },
-- {
+ },
+ {
- "type" : "bom",
- "url" : "https://repo1.maven.org/maven2/org/apache/commons/commons-lang3/3.20.0/commons-lang3-3.20.0-cyclonedx.json"
- },
@@ -740,6 +774,8 @@
- {
- "type" : "build-system",
- "url" : "https://github.com/apache/commons-lang/actions"
++ "type" : "license",
++ "url" : "https://www.apache.org/licenses/LICENSE-2.0.txt"
}
]
},
@@ -782,7 +818,7 @@
"supplier" : {
"name" : "Apache Ant Project Management Committee",
"url" : [
-@@ -1428,17 +1281,13 @@
+@@ -1428,17 +1333,13 @@
},
{
"type" : "website",
@@ -801,7 +837,7 @@
"type" : "mailing-list",
"url" : "https://ant.apache.org/ivy/mailing-lists.html"
},
-@@ -1455,46 +1304,14 @@
+@@ -1455,46 +1356,14 @@
"url" : "https://www.apache.org/licenses/LICENSE-2.0.txt"
},
{
@@ -852,7 +888,7 @@
},
{
"type" : "library",
-@@ -1545,12 +1362,17 @@
+@@ -1545,12 +1414,21 @@
}
}
],
@@ -862,6 +898,10 @@
+ {
+ "type" : "website",
+ "url" : "http://github.com/FasterXML/stax2-api"
++ },
++ {
++ "type" : "license",
++ "url" : "http://www.opensource.org/licenses/bsd-license.php"
+ }
+ ]
},
@@ -872,7 +912,7 @@
"group" : "org.cyclonedx",
"name" : "cyclonedx-core-java",
"version" : "13.1.0",
-@@ -1593,61 +1415,145 @@
+@@ -1593,61 +1471,157 @@
{
"license" : {
"id" : "Apache-2.0",
@@ -888,6 +928,12 @@
- "url" : "https://github.com/CycloneDX/cyclonedx-core-java.git"
+ "type" : "website",
+ "url" : "https://github.com/CycloneDX/cyclonedx-core-java"
+ },
+ {
+- "type" : "issue-tracker",
+- "url" : "https://github.com/CycloneDX/cyclonedx-core-java/issues"
++ "type" : "license",
++ "url" : "http://www.apache.org/licenses/LICENSE-2.0.txt"
+ }
+ ]
+ },
@@ -904,14 +950,12 @@
+ "content" : "b6480d114a23683498ac3f746f959d2f"
},
{
-- "type" : "issue-tracker",
-- "url" : "https://github.com/CycloneDX/cyclonedx-core-java/issues"
-+ "alg" : "SHA-1",
-+ "content" : "d9e58ac9c7779ba3bf8142aff6c830617a7fe60f"
- },
- {
- "type" : "website",
- "url" : "https://github.com/CycloneDX/cyclonedx-core-java"
++ "alg" : "SHA-1",
++ "content" : "d9e58ac9c7779ba3bf8142aff6c830617a7fe60f"
++ },
++ {
+ "alg" : "SHA-256",
+ "content" : "7b751d952061954d5abfed7181c1f645d336091b679891591d63329c622eb832"
},
@@ -924,10 +968,8 @@
+ {
+ "alg" : "SHA3-256",
+ "content" : "00559b4f4066b4917ba4fe2a6f23111eaeada321112d030910d218ced9084b5e"
- },
- {
-- "type" : "build-system",
-- "url" : "https://github.com/CycloneDX/cyclonedx-core-java/actions"
++ },
++ {
+ "alg" : "SHA3-512",
+ "content" : "9579c2f7e7516e177c2d493ccc9eb8150978cf19f6f09b28d116f6935239fd56dc6af2b62b3336f79b0b462445550cd1fb5377a07001a6f44aaab6a32fa2fa47"
+ },
@@ -953,6 +995,12 @@
+ {
+ "type" : "website",
+ "url" : "http://www.slf4j.org"
+ },
+ {
+- "type" : "build-system",
+- "url" : "https://github.com/CycloneDX/cyclonedx-core-java/actions"
++ "type" : "license",
++ "url" : "https://opensource.org/license/mit"
}
]
},
@@ -1016,6 +1064,10 @@
+ {
+ "type" : "website",
+ "url" : "https://bitbucket.org/snakeyaml/snakeyaml"
++ },
++ {
++ "type" : "license",
++ "url" : "http://www.apache.org/licenses/LICENSE-2.0.txt"
+ }
+ ]
}
@@ -1038,7 +1090,7 @@
},
{
"ref" : "pkg:maven/com.fasterxml.jackson.core/jackson-databind@2.22.1?type=jar",
-@@ -1667,10 +1573,33 @@
+@@ -1667,10 +1641,33 @@
]
},
{
@@ -1072,7 +1124,7 @@
"ref" : "pkg:maven/commons-codec/commons-codec@1.22.1?type=jar",
"dependsOn" : [ ]
},
-@@ -1700,9 +1629,7 @@
+@@ -1700,9 +1697,7 @@
},
{
"ref" : "pkg:maven/org.apache.commons/commons-collections4@4.5.0?type=jar",
@@ -1083,7 +1135,7 @@
},
{
"ref" : "pkg:maven/org.apache.commons/commons-lang3@3.20.0?type=jar",
-@@ -1710,20 +1637,7 @@
+@@ -1710,20 +1705,7 @@
},
{
"ref" : "pkg:maven/org.apache.ivy/ivy@2.6.0?type=jar",
@@ -1105,7 +1157,7 @@
},
{
"ref" : "pkg:maven/org.codehaus.woodstox/stax2-api@4.3.0?type=jar",
-@@ -1740,6 +1654,14 @@
+@@ -1740,6 +1722,14 @@
"pkg:maven/org.apache.commons/commons-collections4@4.5.0?type=jar",
"pkg:maven/org.apache.commons/commons-lang3@3.20.0?type=jar"
]
diff --git a/example/ant-cyclonedx-0.2alpha.cdx.json b/example/ant-cyclonedx-0.2alpha.cdx.json
index 2721abd..1c7407b 100644
--- a/example/ant-cyclonedx-0.2alpha.cdx.json
+++ b/example/ant-cyclonedx-0.2alpha.cdx.json
@@ -34,35 +34,35 @@
"hashes" : [
{
"alg" : "MD5",
- "content" : "71770c472761cc38b8c5a806e43b2f2b"
+ "content" : "de73b2090ed784264d7cdf6b94c40b9f"
},
{
"alg" : "SHA-1",
- "content" : "f499b359a70f4d3caef8a58caf0368864979faee"
+ "content" : "117736e22f1f27217eaf9068b1007fddedef5f8f"
},
{
"alg" : "SHA-256",
- "content" : "a16f9ff5f6bec113cc015a5fc9686e136a669bca0e08622e33cfa28d58650685"
+ "content" : "aed1a008c3ebdbb2908d7dbacebbc1d8d489d08ebba0910217f239412ab36b04"
},
{
"alg" : "SHA-512",
- "content" : "c73ef24ab6b67b7246c739b0db08df971a78dcd87d79bef26090198b0a814a7c7c73c0eef7a997492ca7ad01631d4a06747a15656d34e1437644c1c23be6506b"
+ "content" : "add20643bd0e106b27c7200863bf376ea28ee95cd42697820024b2eff5c5bdacc4be0bbbe1138ca8ac35e209df80ce30bd27e1a5eb32d1ae528234936f4ea0ca"
},
{
"alg" : "SHA3-256",
- "content" : "fb8d181de36e4cfad983f3aec0415a7b9ef430e6236318c922bf45fc5277900b"
+ "content" : "192621053a51c43cc73078977487e42ec5b6597c5e95119ba86a283b1aca4470"
},
{
"alg" : "SHA3-512",
- "content" : "3061e7c468516f2f99dd836ac187993b9fdefb8cd445ed41681eff8fa0187fff2714b899aa463317ddf4076e5decb8267911a12eb9725b0f5de4e2bf10674f32"
+ "content" : "11159291538dd1d7fec1de2214579732e76a1233acbff6887ead1b7520bdf784f47f0f6af1ca66f0096ddbbbf7470febd77369260653781ee4ed1b3a6d465c20"
},
{
"alg" : "SHA-384",
- "content" : "3b6a8c38a46aab82b94c9a964721118a6708e2df1f15aa95612494abf4460dd394bfb5863193dcde0cadcdde2bef2ea9"
+ "content" : "c65ed1eb81aa20245bab2173bcab863663dec015f220bc5c5353a0d099e71013f85537a41e8fb673dba35f8bf9ada61d"
},
{
"alg" : "SHA3-384",
- "content" : "6365ab09b437b6563b3653a75f69a48a41b994bd52eff07d1818b539adedcf987a2989821af8a2cea10310858edccaa5"
+ "content" : "031ca0350bcb44f06f57160d0d9bba747f37a403a58b54938758daf84f2b34f07201a6a69052ee8bbbfb15f6df0dec3b"
}
],
"licenses" : [
@@ -146,35 +146,35 @@
"hashes" : [
{
"alg" : "MD5",
- "content" : "71770c472761cc38b8c5a806e43b2f2b"
+ "content" : "de73b2090ed784264d7cdf6b94c40b9f"
},
{
"alg" : "SHA-1",
- "content" : "f499b359a70f4d3caef8a58caf0368864979faee"
+ "content" : "117736e22f1f27217eaf9068b1007fddedef5f8f"
},
{
"alg" : "SHA-256",
- "content" : "a16f9ff5f6bec113cc015a5fc9686e136a669bca0e08622e33cfa28d58650685"
+ "content" : "aed1a008c3ebdbb2908d7dbacebbc1d8d489d08ebba0910217f239412ab36b04"
},
{
"alg" : "SHA-512",
- "content" : "c73ef24ab6b67b7246c739b0db08df971a78dcd87d79bef26090198b0a814a7c7c73c0eef7a997492ca7ad01631d4a06747a15656d34e1437644c1c23be6506b"
+ "content" : "add20643bd0e106b27c7200863bf376ea28ee95cd42697820024b2eff5c5bdacc4be0bbbe1138ca8ac35e209df80ce30bd27e1a5eb32d1ae528234936f4ea0ca"
},
{
"alg" : "SHA3-256",
- "content" : "fb8d181de36e4cfad983f3aec0415a7b9ef430e6236318c922bf45fc5277900b"
+ "content" : "192621053a51c43cc73078977487e42ec5b6597c5e95119ba86a283b1aca4470"
},
{
"alg" : "SHA3-512",
- "content" : "3061e7c468516f2f99dd836ac187993b9fdefb8cd445ed41681eff8fa0187fff2714b899aa463317ddf4076e5decb8267911a12eb9725b0f5de4e2bf10674f32"
+ "content" : "11159291538dd1d7fec1de2214579732e76a1233acbff6887ead1b7520bdf784f47f0f6af1ca66f0096ddbbbf7470febd77369260653781ee4ed1b3a6d465c20"
},
{
"alg" : "SHA-384",
- "content" : "3b6a8c38a46aab82b94c9a964721118a6708e2df1f15aa95612494abf4460dd394bfb5863193dcde0cadcdde2bef2ea9"
+ "content" : "c65ed1eb81aa20245bab2173bcab863663dec015f220bc5c5353a0d099e71013f85537a41e8fb673dba35f8bf9ada61d"
},
{
"alg" : "SHA3-384",
- "content" : "6365ab09b437b6563b3653a75f69a48a41b994bd52eff07d1818b539adedcf987a2989821af8a2cea10310858edccaa5"
+ "content" : "031ca0350bcb44f06f57160d0d9bba747f37a403a58b54938758daf84f2b34f07201a6a69052ee8bbbfb15f6df0dec3b"
}
],
"licenses" : [
diff --git a/example/ant-cyclonedx-0.2alpha.ivy.cdx.json b/example/ant-cyclonedx-0.2alpha.ivy.cdx.json
index c33ede7..667d8e0 100644
--- a/example/ant-cyclonedx-0.2alpha.ivy.cdx.json
+++ b/example/ant-cyclonedx-0.2alpha.ivy.cdx.json
@@ -34,35 +34,35 @@
"hashes" : [
{
"alg" : "MD5",
- "content" : "71770c472761cc38b8c5a806e43b2f2b"
+ "content" : "de73b2090ed784264d7cdf6b94c40b9f"
},
{
"alg" : "SHA-1",
- "content" : "f499b359a70f4d3caef8a58caf0368864979faee"
+ "content" : "117736e22f1f27217eaf9068b1007fddedef5f8f"
},
{
"alg" : "SHA-256",
- "content" : "a16f9ff5f6bec113cc015a5fc9686e136a669bca0e08622e33cfa28d58650685"
+ "content" : "aed1a008c3ebdbb2908d7dbacebbc1d8d489d08ebba0910217f239412ab36b04"
},
{
"alg" : "SHA-512",
- "content" : "c73ef24ab6b67b7246c739b0db08df971a78dcd87d79bef26090198b0a814a7c7c73c0eef7a997492ca7ad01631d4a06747a15656d34e1437644c1c23be6506b"
+ "content" : "add20643bd0e106b27c7200863bf376ea28ee95cd42697820024b2eff5c5bdacc4be0bbbe1138ca8ac35e209df80ce30bd27e1a5eb32d1ae528234936f4ea0ca"
},
{
"alg" : "SHA3-256",
- "content" : "fb8d181de36e4cfad983f3aec0415a7b9ef430e6236318c922bf45fc5277900b"
+ "content" : "192621053a51c43cc73078977487e42ec5b6597c5e95119ba86a283b1aca4470"
},
{
"alg" : "SHA3-512",
- "content" : "3061e7c468516f2f99dd836ac187993b9fdefb8cd445ed41681eff8fa0187fff2714b899aa463317ddf4076e5decb8267911a12eb9725b0f5de4e2bf10674f32"
+ "content" : "11159291538dd1d7fec1de2214579732e76a1233acbff6887ead1b7520bdf784f47f0f6af1ca66f0096ddbbbf7470febd77369260653781ee4ed1b3a6d465c20"
},
{
"alg" : "SHA-384",
- "content" : "3b6a8c38a46aab82b94c9a964721118a6708e2df1f15aa95612494abf4460dd394bfb5863193dcde0cadcdde2bef2ea9"
+ "content" : "c65ed1eb81aa20245bab2173bcab863663dec015f220bc5c5353a0d099e71013f85537a41e8fb673dba35f8bf9ada61d"
},
{
"alg" : "SHA3-384",
- "content" : "6365ab09b437b6563b3653a75f69a48a41b994bd52eff07d1818b539adedcf987a2989821af8a2cea10310858edccaa5"
+ "content" : "031ca0350bcb44f06f57160d0d9bba747f37a403a58b54938758daf84f2b34f07201a6a69052ee8bbbfb15f6df0dec3b"
}
],
"licenses" : [
@@ -146,35 +146,35 @@
"hashes" : [
{
"alg" : "MD5",
- "content" : "71770c472761cc38b8c5a806e43b2f2b"
+ "content" : "de73b2090ed784264d7cdf6b94c40b9f"
},
{
"alg" : "SHA-1",
- "content" : "f499b359a70f4d3caef8a58caf0368864979faee"
+ "content" : "117736e22f1f27217eaf9068b1007fddedef5f8f"
},
{
"alg" : "SHA-256",
- "content" : "a16f9ff5f6bec113cc015a5fc9686e136a669bca0e08622e33cfa28d58650685"
+ "content" : "aed1a008c3ebdbb2908d7dbacebbc1d8d489d08ebba0910217f239412ab36b04"
},
{
"alg" : "SHA-512",
- "content" : "c73ef24ab6b67b7246c739b0db08df971a78dcd87d79bef26090198b0a814a7c7c73c0eef7a997492ca7ad01631d4a06747a15656d34e1437644c1c23be6506b"
+ "content" : "add20643bd0e106b27c7200863bf376ea28ee95cd42697820024b2eff5c5bdacc4be0bbbe1138ca8ac35e209df80ce30bd27e1a5eb32d1ae528234936f4ea0ca"
},
{
"alg" : "SHA3-256",
- "content" : "fb8d181de36e4cfad983f3aec0415a7b9ef430e6236318c922bf45fc5277900b"
+ "content" : "192621053a51c43cc73078977487e42ec5b6597c5e95119ba86a283b1aca4470"
},
{
"alg" : "SHA3-512",
- "content" : "3061e7c468516f2f99dd836ac187993b9fdefb8cd445ed41681eff8fa0187fff2714b899aa463317ddf4076e5decb8267911a12eb9725b0f5de4e2bf10674f32"
+ "content" : "11159291538dd1d7fec1de2214579732e76a1233acbff6887ead1b7520bdf784f47f0f6af1ca66f0096ddbbbf7470febd77369260653781ee4ed1b3a6d465c20"
},
{
"alg" : "SHA-384",
- "content" : "3b6a8c38a46aab82b94c9a964721118a6708e2df1f15aa95612494abf4460dd394bfb5863193dcde0cadcdde2bef2ea9"
+ "content" : "c65ed1eb81aa20245bab2173bcab863663dec015f220bc5c5353a0d099e71013f85537a41e8fb673dba35f8bf9ada61d"
},
{
"alg" : "SHA3-384",
- "content" : "6365ab09b437b6563b3653a75f69a48a41b994bd52eff07d1818b539adedcf987a2989821af8a2cea10310858edccaa5"
+ "content" : "031ca0350bcb44f06f57160d0d9bba747f37a403a58b54938758daf84f2b34f07201a6a69052ee8bbbfb15f6df0dec3b"
}
],
"licenses" : [
@@ -305,6 +305,10 @@
{
"type" : "website",
"url" : "https://github.com/ethlo/itu"
+ },
+ {
+ "type" : "license",
+ "url" : "https://www.apache.org/licenses/LICENSE-2.0.txt"
}
]
},
@@ -362,6 +366,10 @@
{
"type" : "website",
"url" : "https://github.com/FasterXML/jackson"
+ },
+ {
+ "type" : "license",
+ "url" : "https://www.apache.org/licenses/LICENSE-2.0.txt"
}
]
},
@@ -419,6 +427,10 @@
{
"type" : "website",
"url" : "https://github.com/FasterXML/jackson-core"
+ },
+ {
+ "type" : "license",
+ "url" : "https://www.apache.org/licenses/LICENSE-2.0.txt"
}
]
},
@@ -476,6 +488,10 @@
{
"type" : "website",
"url" : "https://github.com/FasterXML/jackson"
+ },
+ {
+ "type" : "license",
+ "url" : "https://www.apache.org/licenses/LICENSE-2.0.txt"
}
]
},
@@ -533,6 +549,10 @@
{
"type" : "website",
"url" : "https://github.com/FasterXML/jackson-dataformat-xml"
+ },
+ {
+ "type" : "license",
+ "url" : "http://www.apache.org/licenses/LICENSE-2.0.txt"
}
]
},
@@ -590,6 +610,10 @@
{
"type" : "website",
"url" : "https://github.com/FasterXML/jackson-dataformats-text"
+ },
+ {
+ "type" : "license",
+ "url" : "https://www.apache.org/licenses/LICENSE-2.0.txt"
}
]
},
@@ -647,6 +671,10 @@
{
"type" : "website",
"url" : "https://github.com/FasterXML/woodstox"
+ },
+ {
+ "type" : "license",
+ "url" : "http://www.apache.org/licenses/LICENSE-2.0.txt"
}
]
},
@@ -704,6 +732,10 @@
{
"type" : "website",
"url" : "https://github.com/package-url/packageurl-java"
+ },
+ {
+ "type" : "license",
+ "url" : "https://opensource.org/licenses/MIT"
}
]
},
@@ -761,6 +793,10 @@
{
"type" : "website",
"url" : "https://github.com/networknt/json-schema-validator"
+ },
+ {
+ "type" : "license",
+ "url" : "https://www.apache.org/licenses/LICENSE-2.0"
}
]
},
@@ -818,6 +854,10 @@
{
"type" : "website",
"url" : "https://commons.apache.org/proper/commons-codec/"
+ },
+ {
+ "type" : "license",
+ "url" : "https://www.apache.org/licenses/LICENSE-2.0.txt"
}
]
},
@@ -875,6 +915,10 @@
{
"type" : "website",
"url" : "https://commons.apache.org/proper/commons-io/"
+ },
+ {
+ "type" : "license",
+ "url" : "https://www.apache.org/licenses/LICENSE-2.0.txt"
}
]
},
@@ -1146,6 +1190,10 @@
{
"type" : "website",
"url" : "https://commons.apache.org/proper/commons-collections/"
+ },
+ {
+ "type" : "license",
+ "url" : "https://www.apache.org/licenses/LICENSE-2.0.txt"
}
]
},
@@ -1203,6 +1251,10 @@
{
"type" : "website",
"url" : "https://commons.apache.org/proper/commons-lang/"
+ },
+ {
+ "type" : "license",
+ "url" : "https://www.apache.org/licenses/LICENSE-2.0.txt"
}
]
},
@@ -1367,6 +1419,10 @@
{
"type" : "website",
"url" : "http://github.com/FasterXML/stax2-api"
+ },
+ {
+ "type" : "license",
+ "url" : "http://www.opensource.org/licenses/bsd-license.php"
}
]
},
@@ -1424,6 +1480,10 @@
{
"type" : "website",
"url" : "https://github.com/CycloneDX/cyclonedx-core-java"
+ },
+ {
+ "type" : "license",
+ "url" : "http://www.apache.org/licenses/LICENSE-2.0.txt"
}
]
},
@@ -1481,6 +1541,10 @@
{
"type" : "website",
"url" : "http://www.slf4j.org"
+ },
+ {
+ "type" : "license",
+ "url" : "https://opensource.org/license/mit"
}
]
},
@@ -1538,6 +1602,10 @@
{
"type" : "website",
"url" : "https://bitbucket.org/snakeyaml/snakeyaml"
+ },
+ {
+ "type" : "license",
+ "url" : "http://www.apache.org/licenses/LICENSE-2.0.txt"
}
]
}
diff --git a/src/main/org/apache/ant/cyclonedx/IvyModuleComponentResolver.java b/src/main/org/apache/ant/cyclonedx/IvyModuleComponentResolver.java
index 87d2d34..275589e 100644
--- a/src/main/org/apache/ant/cyclonedx/IvyModuleComponentResolver.java
+++ b/src/main/org/apache/ant/cyclonedx/IvyModuleComponentResolver.java
@@ -213,9 +213,15 @@ class IvyModuleComponentResolver {
component.setDescription(md.getDescription());
}
+ String licenseUrl = null;
if (!component.hasLicenses()) {
License[] ivyLicenses = md.getLicenses();
if (ivyLicenses != null) {
+
+ if (ivyLicenses.length == 1) {
+ licenseUrl = ivyLicenses[0].getUrl();
+ }
+
for (License ivyLicense : ivyLicenses) {
org.apache.ant.cyclonedx.License license = new org.apache.ant.cyclonedx.License();
license.setName(ivyLicense.getName());
@@ -247,6 +253,14 @@ class IvyModuleComponentResolver {
e.setType(org.cyclonedx.model.ExternalReference.Type.WEBSITE.name());
component.addConfiguredExternalReference(e);
}
+
+ if (licenseUrl != null && !component.getExternalReferences().stream()
+ .anyMatch(e -> e.getType().equals(org.cyclonedx.model.ExternalReference.Type.LICENSE))) {
+ ExternalReference e = new ExternalReference();
+ e.setUrl(licenseUrl);
+ e.setType(org.cyclonedx.model.ExternalReference.Type.LICENSE.name());
+ component.addConfiguredExternalReference(e);
+ }
}
private Map<ModuleRevisionId, Set<IvyNode>> populateDependencyTree(IvySettings settings,