Hello,
I'm trying to write a maven plugin with a custom packaging format, but having
trouble with using the Maven 3 plugins with Maven-Archiver 2.5.
I have this in my plugin's pom.xml for dependencies
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>3.0.4</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId>
<version>3.0.4</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-archiver</artifactId>
<version>2.5</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>3.0</version>
</dependency>
And in my plugin method I have this code to set the archive
MavenArchiver archiver = new MavenArchiver();
archiver.setArchiver(jarArchiver);
archiver.setOutputFile(artifact);
archiver.createArchive(session, project, archive);
project.getArtifact().setFile(artifact);
But I'm getting an error
The type org.apache.maven.artifact.DependencyResolutionRequiredException cannot
be resolved.
this exception was previously defined in the 2.x series of maven-artifact, but
it's not there anymore. I was able to get things to compile using the 2.x
series of maven-artifact and maven-plugin-api, but then I had issues using it
with maven 3.
How do I use maven-archiver 2.5 to implement custom packaging compatible with
Maven 3?
Jon Marston