cyclonedx-gradle-plugin icon indicating copy to clipboard operation
cyclonedx-gradle-plugin copied to clipboard

Build failing after cycloneDX upgrade to 1.7.1

Open fxigit opened this issue 2 years ago • 2 comments

My gradle build started failing after I upgraded my cyclonedx dependency from ver 1.7.0 to ver to 1.7.1. I'm getting this NullPointerException you see in the log below. It seems to be having trouble processing org.sonarsource.html:sonar-html-plugin:3.4.0.2754.

2022-09-08T10:24:42.153-0400 [WARN] [org.gradle.api.Task] An unexpected issue occurred attempting to create a PackageURL for org.sonarsource.html:sonar-html-plugin:3.4.0.2754 2022-09-08T10:24:42.154-0400 [WARN] [org.gradle.api.Task] An unexpected issue occurred attempting to create a PackageURL for org.sonarsource.html:sonar-html-plugin:3.4.0.2754 2022-09-08T10:24:42.154-0400 [WARN] [org.gradle.api.Task] An unexpected issue occurred attempting to create a PackageURL for org.sonarsource.javascript:sonar-javascript-plugin:8.3.0.16208 2022-09-08T10:24:42.154-0400 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationRunner] Build operation 'Execute createBom for :app:cyclonedxBom' completed

...

2022-09-08T10:24:42.165-0400 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] FAILURE: Build failed with an exception. 2022-09-08T10:24:42.165-0400 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 2022-09-08T10:24:42.165-0400 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong: 2022-09-08T10:24:42.165-0400 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Execution failed for task ':app:cyclonedxBom'. 2022-09-08T10:24:42.165-0400 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > java.lang.NullPointerException (no error message) 2022-09-08T10:24:42.165-0400 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 2022-09-08T10:24:42.165-0400 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Exception is: 2022-09-08T10:24:42.165-0400 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:cyclonedxBom'. 2022-09-08T10:24:42.165-0400 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$1(ExecuteActionsTaskExecuter.java:142) 2022-09-08T10:24:42.165-0400 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.gradle.internal.Try$Failure.ifSuccessfulOrElse(Try.java:282) 2022-09-08T10:24:42.165-0400 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at ... 022-09-08T10:24:42.167-0400 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Caused by: java.lang.NullPointerException 2022-09-08T10:24:42.167-0400 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.cyclonedx.model.Dependency.lambda$addDependency$0(Dependency.java:57) 2022-09-08T10:24:42.167-0400 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.cyclonedx.model.Dependency.addDependency(Dependency.java:57) 2022-09-08T10:24:42.167-0400 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] at org.cyclonedx.gradle.CycloneDxTask.lambda$createBom$4(CycloneDxTask.java:269)

fxigit avatar Sep 08 '22 16:09 fxigit

Thanks @fxigit for reporting this issue, do you have a simple reproducer that could help reproducing the exception?

glefloch avatar Sep 09 '22 11:09 glefloch

@glefloch I have the same problem

2013kaa avatar Oct 24 '22 11:10 2013kaa