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

Exclude commons-logging from resteasy-client-microprofile #21148

Merged
merged 1 commit into from
Nov 4, 2021
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
4 changes: 4 additions & 0 deletions extensions/resteasy-classic/rest-client/runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@
<groupId>org.jboss.weld</groupId>
<artifactId>weld-api</artifactId>
</exclusion>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if we should add it to our exclusion list in the build parent?

Also maybe we should add the JBoss Logging Bridge? You should be able to find which one to use in some of the other extensions.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure, I will give it a try

Copy link
Member Author

Choose a reason for hiding this comment

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

@gsmet, commons-logging is already in the exclude list of the build parent (

<exclude>commons-logging:commons-logging</exclude>
) I try to exclude it directly in the bom, this works too but I don't know if we should exclude it there.

Copy link
Member Author

Choose a reason for hiding this comment

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

The commons-logging-jboss-logging is already declared in that pom.xml

Copy link
Member

Choose a reason for hiding this comment

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

Hmm, but why don't we have an error if it's supposed to be excluded?

Copy link
Member Author

Choose a reason for hiding this comment

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

@aloubyansky, @famod Do you know why commons-logging can be in transitive dependencies while it is banned in the maven-enforcer-plugin ?

Copy link
Member

Choose a reason for hiding this comment

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

No, it catches everything.

There's something weird going on because I don't get any commons-logging when doing mvn dependency:tree for this module and in particular for resteasy-client-microprofile I get:

[INFO] +- org.jboss.resteasy:resteasy-client-microprofile:jar:4.7.0.Final:compile
[INFO] |  \- org.jboss.resteasy:resteasy-client-microprofile-base:jar:4.7.0.Final:compile
[INFO] |     +- org.jboss.resteasy:resteasy-client:jar:4.7.0.Final:compile
[INFO] |     |  +- org.jboss.resteasy:resteasy-client-api:jar:4.7.0.Final:compile
[INFO] |     |  \- commons-io:commons-io:jar:2.11.0:compile
[INFO] |     \- org.jboss.resteasy:resteasy-cdi:jar:4.7.0.Final:compile

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think the problem comes from the plug-in but from gradle ignoring it when resolving dependencies. How does maven handles that enforcer rules from dependencies ?

Copy link
Member

Choose a reason for hiding this comment

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

The enforcer just checks that the dependencies are not around, it doesn't exclude anything. So if we don't have it in the Maven dependencies, it's because, using the Maven resolver, the dependency is not around. What I don't understand is why Gradle sees it in its dependencies. Maybe it still includes the transitive dependencies of the excluded dependencies?

Copy link
Member Author

Choose a reason for hiding this comment

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

That’s really weird. Some transitive dependencies may bring commons-logging back but I don’t know how

</exclusions>
</dependency>
<dependency>
Expand Down