-
Notifications
You must be signed in to change notification settings - Fork 127
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
Issue 145: Fix aggregate-add-third-party modifying project dependencies #148
Conversation
Hm, Spring doesn't work with Java 7 anymore. I'll try to rewrite using the shade plugin instead. |
2308f69
to
930435f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@srdo thanks for the PR. Great that it contains an integration test! Please rebase on top of master and see the comments above.
src/main/java/org/codehaus/mojo/license/AbstractAddThirdPartyMojo.java
Outdated
Show resolved
Hide resolved
src/main/java/org/codehaus/mojo/license/AbstractAddThirdPartyMojo.java
Outdated
Show resolved
Hide resolved
src/main/java/org/codehaus/mojo/license/AbstractAddThirdPartyMojo.java
Outdated
Show resolved
Hide resolved
src/main/java/org/codehaus/mojo/license/AbstractAddThirdPartyMojo.java
Outdated
Show resolved
Hide resolved
src/main/java/org/codehaus/mojo/license/AbstractDownloadLicensesMojo.java
Outdated
Show resolved
Hide resolved
src/main/java/org/codehaus/mojo/license/AggregatorAddThirdPartyMojo.java
Outdated
Show resolved
Hide resolved
src/main/java/org/codehaus/mojo/license/api/LoadedProjectDependencies.java
Outdated
Show resolved
Hide resolved
src/main/java/org/codehaus/mojo/license/api/LoadedProjectDependencies.java
Outdated
Show resolved
Hide resolved
src/main/java/org/codehaus/mojo/license/api/LoadedProjectDependencies.java
Outdated
Show resolved
Hide resolved
I think the comments are addressed. Let me know if it looks good, and I'll squash. |
src/main/java/org/codehaus/mojo/license/api/LoadedProjectDependencies.java
Outdated
Show resolved
Hide resolved
src/main/java/org/codehaus/mojo/license/api/LoadedProjectDependencies.java
Outdated
Show resolved
Hide resolved
I think there's a small bug in |
Rebased, and fixed another few bugs in The issue with wrong transitive dependencies wasn't a big deal, but I think we might as well fix it. When the aggregator mojo finds dependencies for sibling projects, it was possible to be missing some dependencies in the return from |
The Java 7 tests failed, they pass for me locally. Going to retrigger the build. |
Thanks a lot for the fixes and special thanks for the test!
Not sure you imply (a) you fixed it or (b) it needs to be fixed. If (b) is the case, please file a new issue. The PR looks good to me now. Please squash the commits, and reword to something like |
It is fixed now. Squashed. Thanks for reviewing. |
@srdo good work, thanks! |
Fixes #145.
The issue occurs because the plugin modifies the MavenProject dependency lists in DefaultDependencyTool.loadProjectArtifacts. Dependencies may in some cases be removed if they belong to the same reactor as the current project.
I've added a modified version of the reproduction code from https://github.com/jimonthebarn/maven-license-plugin-issue as a test.
The changes are attempting to preserve the current behavior of the plugin, while also not modifying the MavenProject fields.