The 3.1.0 release of Maven relies on Eclipse Aether (org.eclipse.aether) instead of Sonatype Aether (org.sonatype.aether). This seems to break compatibility for plugins relying on Sonatype aether : try running such plugins and you'll run into :

java.lang.NoClassDefFoundError: org/sonatype/aether/*
Caused by: java.lang.ClassNotFoundException: org.sonatype.aether.*

As documented in https://cwiki.apache.org/confluence/display/MAVEN/AetherClassNotFound

Now, is it possible to make a mojo relying on aether classes (such as org.sonatype.aether.RepositorySystemSession) run both with Maven 3.0.x and Maven 3.1.x ?

Or do I have to release two versions of the same plugin, one for 3.0.x and one for 3.1.x ? Putting enforcer rules like this :

  <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-enforcer-plugin</artifactId>
    <version>1.3</version>
    <executions>
      <execution>
        <id>enforce-maven</id>
        <goals>
          <goal>enforce</goal>
        </goals>
        <configuration>
          <rules>
            <requireMavenVersion>
              <version>[3.0,3.1)</version>
            </requireMavenVersion>
          </rules>
        </configuration>
      </execution>
    </executions>
  </plugin>

I already posted the question on Maven developers mailing list, but no answer so far...

Edit
Report