-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 during aggregate check in a multi module project #3679
Comments
Confirm NPE in aggregate, downgraded to 6.3.1 version |
Nothing to do with aggregates or multi-module. I get the same NPE stacktrace running check on a single regular project. |
I can confirm this issue as well. We also get the NPE in the 6.3.2. |
Can confirm this too. When upgrading from 6.3.1 to 6.3.2, this NPE occurs. |
Same problem here, guessing it is caused by changes introduced by #3627 |
Can anyone provide a sample pom.xml and version of maven that is having this issue? |
I ran into the same issue. The branch The NPE occurs with both Maven 3.6.3 and 3.8.2: > mvn -version
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /c/Program Files/Maven/maven-3.6.3
Java version: 11.0.6, vendor: AdoptOpenJDK, runtime: /usr/lib/jvm/adoptopenjdk-11-hotspot-amd64
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.4.0-19041-microsoft", arch: "amd64", family: "unix" > mvn -version
Apache Maven 3.8.2 (ea98e05a04480131370aa0c110b8c54cf726c06f)
Maven home: /c/Program Files/Maven/maven-3.8.2
Java version: 11.0.6, vendor: AdoptOpenJDK, runtime: /usr/lib/jvm/adoptopenjdk-11-hotspot-amd64
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.4.0-19041-microsoft", arch: "amd64", family: "unix" |
@jeremylong I'll have a look at this |
Appears to have its root-cause triggered by dependencies with classifiers. The culprit in spring-banner-plugin is for |
It breaks at the project-level dependency-node which is represented by a null-artifact DependencyNode with children, not sure whether Maven project would expect the project node to be offered to the resolver. It appears to at least not have been tested like with a filter for a classifier as the NPE is deep down in the maven shared utilities. |
Fairly certain this is a bug in the maven shared utilities that's biting us with the transition to the maven DependencyResolver in order to properly process maven repositories in the dependency-tree. |
Can we revert this until the fix in maven shared components is available? |
It's only a breaking change because the maven resolution is breaking. The change itself is a bugfix for a regression bug in 6.3: #3626. Unfortunately apparently none of our test-cases included a (direct or transitive) dependency with a classifier which made this bug surface only in the wild. |
@aikebah Great work digging in to this. Do you have any experience with how long time getting bugs fixed in Maven shared utilities might take? Also will you add a test for this to ensure dependencies with classifiers work in the future? |
@viktor-thell-seal Definitely want to include a test to ensure this doesn't surface again in future. Still looking to see if we can change our internal resolution approach to mitigate the issue without requiring a fix in the maven shared utilities. |
Found a work-around that makes at least the sample project @acanda shared pass. Running some final validations to see if the new testcase properly breaks at this issue without the patch and when succeeding expect to file a PR later tonight for review by @jeremylong. |
The fix will be released - hopefully Friday morning (US Eastern). |
This reverts commit d7dbd80. Reason: jeremylong/DependencyCheck#3679
Could you leave this issue open untill it is solved? I ran into the same issue and could not find this ticket. Probably many others will experience the same. |
Is it already solved? I ran in the same issue |
The fix will be in the next release - just finishing up testing. |
Had the same NPE with 6.3.2; updated dependency-check-maven plugin version to 6.4.1 and can confirm this is no more an issue here. <plugin>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-maven</artifactId>
<version>6.4.1</version>
<reportSets>
<reportSet>
<reports>
<report>aggregate</report>
</reports>
</reportSet>
</reportSets>
</plugin> |
Can confirm that 6.4.1 works. Thank you |
I too do confirm that 6.4.1 fixed the issue. |
Describe the bug
NPE during aggregate check in a multi module project
Version of dependency-check used
Maven-Plugin:
Log file
Stacktrace (Click to expand)
To Reproduce
Run the aggregate goal in a multi module project.
Expected behavior
No exception
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: