Skip to content
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

Ignore all module-info classes #34

Closed
wants to merge 1 commit into from
Closed

Ignore all module-info classes #34

wants to merge 1 commit into from

Conversation

skitt
Copy link

@skitt skitt commented Nov 29, 2018

module-info classes can be stored in subdirectories, which makes them
appear with packages in the duplicate analysis. An example of this is
Byte Buddy 1.9.3, which ships META-INF/versions/9/module-info.class in
both byte-buddy and byte-buddy-agent.

This patch ignores module-info classes anywhere. This fixes #33.

Signed-off-by: Stephen Kitt skitt@redhat.com

module-info classes can be stored in subdirectories, which makes them
appear with packages in the duplicate analysis. An example of this is
Byte Buddy 1.9.3, which ships META-INF/versions/9/module-info.class in
both byte-buddy and byte-buddy-agent.

This patch ignores module-info classes anywhere. This fixes #33.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
@hgschmie
Copy link
Contributor

This is actually a bit trickier, because what you see is just a symptom and not the cause. The cause is the new multi-release jar format that was introduced as part of Java 9. The plugin needs to learn about this format (and treat the pieces in the jar that are located in META-INF/versions/ the same as other resources on the classpath. I have this as a TODO (as we are moving beyond Java 8 at $WORK as well), so I want to add a more comprehensive fix than just another exclusion pattern.

@skitt
Copy link
Author

skitt commented Mar 27, 2019

Yes, of course, and a more comprehensive fix would be very welcome ;-). I was hoping for a quick fix so we could remove our own exclusions, but you’re the maintainer! I’ll delete my PR in a little while, unless you’d rather I didn’t.

@skitt skitt closed this Mar 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ignore /META-INF/versions/9/module-info.class by default
2 participants