-
-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NPE fails build during cyclonedxBom task #500
Comments
Good to see the bug is already reported.
|
Same issue, it's a major one. I have a base app and it fails even there. It's okay on 1.9.0 and fails on 1.10.0 |
I run into the same issue when I use the CycloneDX Gradle Plugin together with Spring Boot Actuator. https://spring.io/blog/2024/05/24/sbom-support-in-spring-boot-3-3 |
It can be ignored in the following way: cyclonedxBom {
skipConfigs = ['kotlinNativeBundleConfiguration']
} |
I believe that changes from this PR #532 must fix this issue |
@skhokhlov ... thx for the tip. With your configuration I was able to avoid the error. Just for the next one, the kotlin equivalent looks as follows: tasks.named<CycloneDxTask>("cyclonedxBom") {
skipConfigs.add("kotlinNativeBundleConfiguration")
} Why do you think #532 is fixing this issue? |
There is a difference on how dependency graph is being built. In the current implementation it based on artifacts cyclonedx-gradle-plugin/src/main/java/org/cyclonedx/gradle/CycloneDxTask.java Lines 444 to 448 in 2529769
cyclonedx-gradle-plugin/src/main/java/org/cyclonedx/gradle/CycloneDxTask.java Lines 509 to 514 in 2529769
However, there is a scenario when dependency doesn't have a declared artifact, for instance In #532 it work differently, at first it collects resolved dependencies and generated PackageURLs, and only then collects artifacts if available. |
I just tested this in my project with version |
@danielkutik great to hear! I'll close this issue for now. Feel free to reopen it if you find that it's still present. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Describe the bug
Since v1.10.0 the
cyclonedxBom
fails the build becauseAn unexpected issue occurred attempting to create a PackageURL for org.jetbrains.kotlin:kotlin-native-prebuilt:2.0.10
. The message appeared already in v1.9.0 and v1.8.10 without failing the build.To Reproduce
the build.toml:
and the build.gradle.kts:
command:
./gradlew cyclonedxBom --stacktrace
Expected behavior
No warning and no failing build... I guess
Environment (please complete the following information):
./gradlew --version:
Additional context
the stacktrace:
The text was updated successfully, but these errors were encountered: