My Spring Boot app pom app has the following: documentation :
<dependencyManagement> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-dependencies</artifactId> <version>${spring-boot.version}</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> </dependencyManagement>
I need to use use dependencyManagement and <scope>import</scope> because I need to use the standard corporate pom base.
However, the exclusion of transitive dependencies spring-boot-dependencies not ruled out. In my particular case, Spring Boot 1.2.1.RELEASE brings a version of Jetty that is too new in relation to some of my other <dependencies> . I tried using <exclusion> forms:
<dependencyManagement> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>${spring-boot.version}</version> <type>pom</type> <scope>import</scope> <exclusions> <exclusion> <groupId>org.eclipse.jetty</groupId> <artifactId>*</artifactId> </exclusion> </exclusions> </dependency> </dependencies> </dependencyManagement>
using Maven 3.2.1 wildcard support , but this does not seem to take effect.
Is there a solution to this problem besides explicitly overriding all Jetty dependencies? There are many Jetty libraries, and this approach will be rather fragile. Also, it looks like I will need to do the same with Jetty's transient dependencies.
source share