Hello,
I have a mojo with the following :
@Parameter( readonly = true, defaultValue = "${repositorySystemSession}" )
private RepositorySystemSession repoSession;
public void execute() throws MojoExecutionException {
...
DefaultDependencyResolutionRequest dependencyResolutionRequest =
new DefaultDependencyResolutionRequest(pomProject, repoSession);
...
}
If RepositorySystemSession is org.eclipse.aether.RepositorySystemSession it
works fine (gets injected) with 3.1.x;
If it is org.sonatype.aether.RepositorySystemSession, it works fine with
3.0.x
I get my dependencies mainly from :
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>
(and 3.0.5 if I use org.sonatype)
My question is : how can I make this mojo compatible with both 3.0.x and
3.1.x ?
Thank you very much in advance !
Anthony