Attach correct artifact to the archive project
@@ -113,6 +113,8 @@ public class ArchiveMojo extends MojoSupport {
private boolean useSymLinks = false;
public void execute() throws MojoExecutionException, MojoFailureException {
+ org.apache.maven.artifact.Artifact artifact = project.getArtifact();
+ artifact.setFile(targetFile);
try {
//now pack up the server.
if(archiveTarGz){
@@ -144,8 +146,8 @@ public class ArchiveMojo extends MojoSupport {
projectHelper.attachArtifact(project, artifact1.getType(), classifier, target1);
}
- artifact1.setFile(target1);
- project.setArtifact(artifact1);
+ artifact2.setFile(target1);
+ project.setArtifact(artifact2);
}
public File archive(File source, File dest, Artifact artifact) throws //ArchiverException,
