Exclude commons-logging from starter POMs
Update all relevant starter POMs to include a `spring-core` dependency with an exclusion on `commons-logging`. This prevents `commons-logging` and `jcl-over-slf4j` from both being on the classpath. Also add enforcer rules to ensure that commons-logging doesn't sneak back in, and that there is no dependency convergence. (some additional libraries were required in spring-boot-dependencies) Tested with a sample maven project as well as using the `spring jar` command. Fixes gh-985
This commit is contained in:
@@ -53,4 +53,32 @@
|
||||
<module>spring-boot-starter-web</module>
|
||||
<module>spring-boot-starter-websocket</module>
|
||||
</modules>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-enforcer-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>enforce-rules</id>
|
||||
<goals>
|
||||
<goal>enforce</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<rules>
|
||||
<bannedDependencies>
|
||||
<excludes>
|
||||
<exclude>commons-logging:commons-logging:*</exclude>
|
||||
</excludes>
|
||||
<searchTransitive>true</searchTransitive>
|
||||
</bannedDependencies>
|
||||
<dependencyConvergence/>
|
||||
</rules>
|
||||
<fail>true</fail>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
||||
Reference in New Issue
Block a user