This is an automated email from the ASF dual-hosted git repository.
cstamas pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-resolver.git
The following commit(s) were added to refs/heads/master by this push:
new c889b5b0d Fix #2257: declare commons-logging directly in
maven-resolver-tools (#2258)
c889b5b0d is described below
commit c889b5b0d904fe5554031539601a611e438e7ec3
Author: Arturo Bernal <[email protected]>
AuthorDate: Tue Nov 3 21:33:17 2026 +0100
Fix #2257: declare commons-logging directly in maven-resolver-tools (#2258)
* Declare commons-logging directly in maven-resolver-tools
Building the module fails the javadoc doclet step with
NoClassDefFoundError: org/apache/commons/logging/LogFactory when
JavadocSite.createHttpClient tries to fetch an external javadoc
package list.
maven-plugin-tools-api pulls httpclient with its normal commons-logging
dependency, but maven-resolver-transport-apache also depends on
httpclient and excludes commons-logging (it uses jcl-over-slf4j
instead). Since transport-apache is declared first in this module's
pom, its exclusion wins the conflict for the whole reactor and
commons-logging never makes it onto the classpath.
Declare commons-logging directly, at the version httpclient 4.5.14
itself depends on, so the doclet run has it regardless of declaration
order.
Fixes #2257
Claude-Session: https://claude.ai/code/session_0153qyh22xBMN1vPfWGz3jSH
* Scope commons-logging as runtime in maven-resolver-tools
Only the javadoc doclet run needs it; keep it off the compile
classpath of consumers, consistent with the other build-only deps in
this module.
Claude-Session: https://claude.ai/code/session_0153qyh22xBMN1vPfWGz3jSH
---
maven-resolver-tools/pom.xml | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/maven-resolver-tools/pom.xml b/maven-resolver-tools/pom.xml
index 24e41d54f..79df5f7e7 100644
--- a/maven-resolver-tools/pom.xml
+++ b/maven-resolver-tools/pom.xml
@@ -204,6 +204,16 @@
<artifactId>maven-settings</artifactId>
<version>${maven3Version}</version>
</dependency>
+ <!-- maven-plugin-tools-api's httpclient dependency needs this to fetch
external javadoc package lists
+ (JavadocSite.createHttpClient). maven-resolver-transport-apache above
also depends on httpclient but
+ excludes commons-logging, and since it is declared first, that
exclusion otherwise wins the conflict
+ for the whole reactor. Declare it directly so the doclet run does not
fail with NoClassDefFoundError. -->
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>1.2</version>
+ <scope>runtime</scope>
+ </dependency>
<!-- Not needed during compile -->
<dependency>