cxf-spring-boot-starter icon indicating copy to clipboard operation
cxf-spring-boot-starter copied to clipboard

Maven Enforcer Plugin

Open rtc11 opened this issue 5 years ago • 1 comments

I always use maven-enforcer-plugin in my spring-boot apps, but I seem to get some dependency mismatches: The plugin:

<build>
        <plugins>
            <plugin>
                <artifactId>maven-enforcer-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <dependencyConvergence/>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

The result:

Dependency convergence error for com.sun.xml.fastinfoset:FastInfoset:1.2.15 paths to dependency are:
  +-de.codecentric:cxf-spring-boot-starter:2.1.7.RELEASE
    +-de.codecentric:cxf-spring-boot-starter-maven-plugin:2.1.7.RELEASE
      +-org.glassfish.jaxb:jaxb-runtime:2.3.1
        +-com.sun.xml.fastinfoset:FastInfoset:1.2.15
and
  +-de.codecentric:cxf-spring-boot-starter:2.1.7.RELEASE
    +-de.codecentric:cxf-spring-boot-starter-maven-plugin:2.1.7.RELEASE
      +-com.sun.xml.ws:jaxws-rt:2.3.2
        +-com.sun.xml.fastinfoset:FastInfoset:1.2.16
Dependency convergence error for org.apache.maven:maven-artifact:3.6.0 paths to dependency are:
  +-de.codecentric:cxf-spring-boot-starter:2.1.7.RELEASE
    +-de.codecentric:cxf-spring-boot-starter-maven-plugin:2.1.7.RELEASE
      +-org.apache.maven:maven-plugin-api:3.6.0
        +-org.apache.maven:maven-artifact:3.6.0
and
  +-de.codecentric:cxf-spring-boot-starter:2.1.7.RELEASE
    +-de.codecentric:cxf-spring-boot-starter-maven-plugin:2.1.7.RELEASE
      +-org.twdata.maven:mojo-executor:2.3.0
        +-org.apache.maven:maven-core:3.0.5
          +-org.apache.maven:maven-artifact:3.0.5
Dependency convergence error for org.apache.maven:maven-artifact:3.6.0 paths to dependency are:
  +-de.codecentric:cxf-spring-boot-starter:2.1.7.RELEASE
    +-de.codecentric:cxf-spring-boot-starter-maven-plugin:2.1.7.RELEASE
      +-org.apache.maven:maven-plugin-api:3.6.0
        +-org.apache.maven:maven-artifact:3.6.0
and
  +-de.codecentric:cxf-spring-boot-starter:2.1.7.RELEASE
    +-de.codecentric:cxf-spring-boot-starter-maven-plugin:2.1.7.RELEASE
      +-org.twdata.maven:mojo-executor:2.3.0
        +-org.apache.maven:maven-core:3.0.5
          +-org.apache.maven:maven-artifact:3.0.5

These are not all of them.

rtc11 avatar Sep 09 '19 10:09 rtc11

I experiencing the same issue. With cxf-spring-boot-starter in version 2.4.1 and spring-boot-starter-parent in version 2.4.4, there are 11 third party dependencies that are different in their versions. The solution would be to manage these versions using dependencyManagement, but this leads to more maintenance effort later on.

Upon further inspection most of these errors are coming from the cxf-spring-boot-starter-maven-plugin, so maybe an issues should be opened in this project too.

bennypi avatar Mar 23 '21 09:03 bennypi