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

Adds filter to file module-info.class #20370

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,10 @@ private void buildUberJar0(CurateOutcomeBuildItem curateOutcomeBuildItem,
for (Map.Entry<String, Set<AppDependency>> entry : duplicateCatcher.entrySet()) {
if (entry.getValue().size() > 1) {
if (explained.add(entry.getValue())) {
log.warn("Dependencies with duplicate files detected. The dependencies " + entry.getValue()
+ " contain duplicate files, e.g. " + entry.getKey());
if (!"module-info.class".endsWith(entry.getKey())) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

@netodevel netodevel Sep 27, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gsmet,

I didn't add it there because it would have to be dynamic and IGNORED_ENTRIES there seems to be too static.

e. g:

META-INF/versions/{param_dynamic}/module-info.class
META-INF/versions/9/module-info.class
META-INF/versions/11/module-info.class

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gsmet, wdyt?
I couldn't think of anything better.

Copy link

@devprojectsme devprojectsme Dec 29, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@netodevel,@gsmet - sorry to bother, but I guess you have turned it the other way around:

instead of

if (!entry.getKey().endsWith("module-info.class"))

you have written:

if (!"module-info.class".endsWith(entry.getKey()))

which hardly ever would be the case, or?

Have found it still written the same way in the 2.6.1.Final

log.warn("Dependencies with duplicate files detected. The dependencies " + entry.getValue()
+ " contain duplicate files, e.g. " + entry.getKey());
}
}
}
}
Expand Down