mirror of
https://github.com/spring-cloud/spring-cloud-build.git
synced 2026-10-03 16:49:03 +00:00
Exclude logback-classic from generate-configprops plugin dependency
spring-cloud-build-docs is consumed via the jar-with-dependencies classifier, which already bundles a matched logback-classic/ logback-core pair. exec-maven-plugin's includePluginDependencies classpath merge also separately resolves the dependency's own unversioned logback-classic, landing an old, incompatible logback-classic/logback-core split across the uber jar and the separately-resolved thin jar. Depending on classpath ordering this intermittently fails generate-configprops with: java.lang.NoSuchMethodError: 'java.lang.ClassLoader ch.qos.logback.core.util.Loader.systemClassloaderIfNull(java.lang.ClassLoader)' Excluding logback-classic (and transitively logback-core) forces the classpath to rely solely on the bundled, self-consistent pair.
This commit is contained in:
@@ -1248,6 +1248,20 @@
|
||||
</version>
|
||||
<classifier>${spring-cloud-build-docs-classifier}</classifier>
|
||||
<type>jar</type>
|
||||
<!-- The jar-with-dependencies classifier above already bundles a
|
||||
matched logback-classic/logback-core pair. Without this
|
||||
exclusion, exec-maven-plugin's includePluginDependencies
|
||||
classpath merge also resolves spring-cloud-build-docs' own
|
||||
unversioned logback-classic dependency separately, landing an
|
||||
old, incompatible logback-classic/logback-core split across the
|
||||
two jars and failing with a NoSuchMethodError depending on
|
||||
classpath ordering. -->
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>ch.qos.logback</groupId>
|
||||
<artifactId>logback-classic</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<configuration>
|
||||
|
||||
Reference in New Issue
Block a user