nx-eric-jarosch opened a new pull request, #4:
URL: https://github.com/apache/ant-antlibs-cyclonedx/pull/4

   Fixes https://bz.apache.org/bugzilla/show_bug.cgi?id=70273
   
   I noticed that the `IvyDependencyTree` uses `IvyNode#isEvicted`, but 
`IvyModuleComponentResolver` does not.
   I added a check for eviction where the dependency tree nodes are iterated.
   
   ---
   
   ### Test
   
   When using the ivy.xml attached in 70273, the (INFO) log output now shows:
   ```
   :: resolution report :: resolve 282ms :: artifacts dl 24ms
        :: evicted modules:
        org.jetbrains.kotlin#kotlin-stdlib-jdk8;1.9.10 by 
[org.jetbrains.kotlin#kotlin-stdlib-jdk8;1.8.21] in [default]
        org.jetbrains.kotlin#kotlin-stdlib-common;1.8.21 by 
[org.jetbrains.kotlin#kotlin-stdlib-common;1.9.10] in [default]
   
   ...
   
   the dependency 'org.jetbrains.kotlin#kotlin-stdlib-jdk8;1.9.10' is evicted 
for conf 'default' and will not be included in 
'com.example#npe-test;working@HOSTNAME'.
   the dependency 'org.jetbrains.kotlin#kotlin-stdlib-common;1.8.21' is evicted 
for conf 'default' and will not be included in 
'com.example#npe-test;working@HOSTNAME'.
   ```
   
   <details>
   <summary>The generated SBOM matches the dependency tree:</summary>
   
   ```
   Dependency tree for com.example-npe-test
   \- com.squareup.okhttp3#okhttp;4.12.0
   |  +- com.squareup.okio#okio;3.6.0
   |  |  \- com.squareup.okio#okio-jvm;3.6.0
   |  |  |  +- org.jetbrains.kotlin#kotlin-stdlib-jdk8;1.8.21
   |  |  |  |  +- org.jetbrains.kotlin#kotlin-stdlib;1.8.21
   |  |  |  |  |  +- org.jetbrains.kotlin#kotlin-stdlib-common;1.9.10
   |  |  |  |     \- org.jetbrains#annotations;13.0
   |  |  |  |  \- org.jetbrains.kotlin#kotlin-stdlib-jdk7;1.8.21
   |  |  |  |  |  \- org.jetbrains.kotlin#kotlin-stdlib;1.8.21
   |  |  |  |  |  |  +- org.jetbrains.kotlin#kotlin-stdlib-common;1.9.10
   |  |  |  |  |     \- org.jetbrains#annotations;13.0
   |  |     \- org.jetbrains.kotlin#kotlin-stdlib-common;1.9.10
   |  \- org.jetbrains.kotlin#kotlin-stdlib-jdk8;1.8.21
   |  |  +- org.jetbrains.kotlin#kotlin-stdlib;1.8.21
   |  |  |  +- org.jetbrains.kotlin#kotlin-stdlib-common;1.9.10
   |  |     \- org.jetbrains#annotations;13.0
   |  |  \- org.jetbrains.kotlin#kotlin-stdlib-jdk7;1.8.21
   |  |  |  \- org.jetbrains.kotlin#kotlin-stdlib;1.8.21
   |  |  |  |  +- org.jetbrains.kotlin#kotlin-stdlib-common;1.9.10
   |  |  |     \- org.jetbrains#annotations;13.0
   ```
   
   ```
     "dependencies" : [
       {
         "ref" : "pkg:maven/com.example/npe@working@HOSTNAME?type=jar",
         "dependsOn" : [
           "pkg:maven/com.squareup.okhttp3/[email protected]?type=jar"
         ]
       },
       {
         "ref" : "pkg:maven/com.squareup.okhttp3/[email protected]?type=jar",
         "dependsOn" : [
           "pkg:maven/com.squareup.okio/[email protected]?type=jar",
           "pkg:maven/org.jetbrains.kotlin/[email protected]?type=jar"
         ]
       },
       {
         "ref" : "pkg:maven/com.squareup.okio/[email protected]?type=jar",
         "dependsOn" : [
           
"pkg:maven/org.jetbrains.kotlin/[email protected]?type=jar",
           "pkg:maven/org.jetbrains.kotlin/[email protected]?type=jar"
         ]
       },
       {
         "ref" : "pkg:maven/com.squareup.okio/[email protected]?type=jar",
         "dependsOn" : [
           "pkg:maven/com.squareup.okio/[email protected]?type=jar"
         ]
       },
       {
         "ref" : 
"pkg:maven/org.jetbrains.kotlin/[email protected]?type=jar",
         "dependsOn" : [ ]
       },
       {
         "ref" : 
"pkg:maven/org.jetbrains.kotlin/[email protected]?type=jar",
         "dependsOn" : [
           "pkg:maven/org.jetbrains.kotlin/[email protected]?type=jar"
         ]
       },
       {
         "ref" : 
"pkg:maven/org.jetbrains.kotlin/[email protected]?type=jar",
         "dependsOn" : [
           "pkg:maven/org.jetbrains.kotlin/[email protected]?type=jar",
           "pkg:maven/org.jetbrains.kotlin/[email protected]?type=jar"
         ]
       },
       {
         "ref" : "pkg:maven/org.jetbrains.kotlin/[email protected]?type=jar",
         "dependsOn" : [
           
"pkg:maven/org.jetbrains.kotlin/[email protected]?type=jar",
           "pkg:maven/org.jetbrains/[email protected]?type=jar"
         ]
       },
       {
         "ref" : "pkg:maven/org.jetbrains/[email protected]?type=jar",
         "dependsOn" : [ ]
       }
     ]
   ```
   </details>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to