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 /META-INF/versions/9/module-info.class by default #33

Closed
Mortinke opened this issue Nov 29, 2018 · 6 comments
Closed

Ignore /META-INF/versions/9/module-info.class by default #33

Mortinke opened this issue Nov 29, 2018 · 6 comments

Comments

@Mortinke
Copy link

Mortinke commented Nov 29, 2018

We have the same issue with /META-INF/versions/9/module-info.clas files as in #31.
e.g. https://travis-ci.org/zalando/logbook/jobs/448681344 or #31 comment

@mpellegrini
Copy link

Wondering if the mentioned PR mentioned above would get merged?

@hgschmie
Copy link
Contributor

Hi, thanks for the ping. This is related to multi-release jars and requires a more comprehensive change to the plugin. I am planning to do this when I find time.

As a workaround, you can add this pattern in your pom as well.

@mpellegrini
Copy link

Thanks for the quick reply. I have added the ignore pattern to my pom for the time being.

Thanks for your work on producing a very useful plugin!!

wmfgerrit pushed a commit to wikimedia/wikimedia-discovery-discovery-parent-pom that referenced this issue Apr 4, 2019
See basepom/duplicate-finder-maven-plugin#33
for details.

Change-Id: I582fc1447dbe6db09888c78eb6ed95ae2cb62250
@stevenschlansker
Copy link
Contributor

This problem is continuing to spread -- latest releases of very popular jars like assertj and byte-buddy now conflict with each other.

@hgschmie
Copy link
Contributor

hgschmie commented Sep 6, 2019

I need to find time to work out how to deal with multi-release jars. PRs very welcome

hgschmie added a commit to hgschmie/duplicate-finder-maven-plugin that referenced this issue Oct 27, 2019
Use more care when deciding whether a given file is a class file or a
resource. Align closer to the java specification (and what the class
loaders consider a valid class name).

Add an integration test for issue 33 that tests the example from basepom#33.
hgschmie added a commit that referenced this issue Oct 28, 2019
Use more care when deciding whether a given file is a class file or a
resource. Align closer to the java specification (and what the class
loaders consider a valid class name).

Add an integration test for issue 33 that tests the example from #33.
@hgschmie
Copy link
Contributor

This is fixed in the next version. I am planning that the next version will be the last one that runs on JDK8 and the one after will be JDK9+ exclusive.

In that version, I am planning to do more work with multi-release jars; currently there is a corner case where a duplicate class is not detected:

Base jar contains no conflicts
  |
  +-- META-INF/versions/9/A.class    is a conflict with an existing class on the class path

the current plugin would not detect this conflict when running under JDK9. To be able to manage these type of conflicts, the code must analyze the Multi-Release flag from the manifest and then build a map on which classes are actually visible on the class path. Very doable but I see no point in doing this for the JDK 8 version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants