Question

I am trying to use the maven-enforcer-plugin with the convergence rule. I managed to get rid of all problems except one. We use gwt in our project and need the hibernate-validator 4.1.0.Final on the client side with scope provided. On the server side we need hibernate-validator 4.2.0.Final because we requrire some of the newer features. The 4.1.0.Final dependency has the classifier sources. This way I am able to have both versions in one pom. Everything works fine but the enforcer-plugin is not so happy and fails.

Is there any way I can configure the plugin to allow this "problem" ?

Edit:

The enforcer-plugin fails with the following error: 
[WARNING] Rule 0: org.apache.maven.plugins.enforcer.DependencyConvergence failed with message:

Failed while enforcing releasability the error(s) are [
Dependency convergence error for org.hibernate:hibernate-validator:4.1.0.Final paths to dependency are...

Regards, arne

No correct solution

OTHER TIPS

If anybody runs into the same Problem: I solved it by renaming the artifact-id of the older version to hibernate-validator-gwt and uploading it to our own repository. Works for now.

I had the same problem with a new testcontainers-Version.

I got the following error:

[WARNING] Rule 1: org.apache.maven.plugins.enforcer.DependencyConvergence failed with message:
Failed while enforcing releasability the error(s) are [
Dependency convergence error for net.java.dev.jna:jna:5.2.0 paths to dependency are:
+-myGroupId:myArtifactId:0.1-SNAPSHOT
  +-org.testcontainers:jdbc:1.15.0-rc2
    +-org.testcontainers:database-commons:1.15.0-rc2
      +-org.testcontainers:testcontainers:1.15.0-rc2
        +-org.rnorth.visible-assertions:visible-assertions:2.1.2
          +-net.java.dev.jna:jna:5.2.0
and
+-myGroupId:myArtifactId:0.1-SNAPSHOT
  +-org.testcontainers:jdbc:1.15.0-rc2
    +-org.testcontainers:database-commons:1.15.0-rc2
      +-org.testcontainers:testcontainers:1.15.0-rc2
        +-com.github.docker-java:docker-java-transport-zerodep:3.2.5
          +-net.java.dev.jna:jna:5.5.0

I, kind of, ignored this error by adding the dependency which converged not correctly to my dependencyManagement:

<dependency>
   <!-- declared to "ignore" error in enforcer-plugin in dependencyConvergence of testcontainer-dependency -->
   <groupId>net.java.dev.jna</groupId>
   <artifactId>jna</artifactId>
   <version>5.5.0</version>
</dependency>

With this declaration, the enforcer-plugin is satisfied. I'm not that sure, if this is a good solution, due to the fact, that I got a new dependency managed, which I rather don't want to manage by myself.

P.S.: Here is the feature Dependency Convergence, we are talking about.

Edit: Probably an update of the used maven-Version may also help to resolve to convergence-problem without managing any additional dependency.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top