karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbono...@apache.org
Subject [karaf] branch karaf-4.1.x updated: [KARAF-5939] Attach correct artifact to the archive project
Date Mon, 26 Nov 2018 15:15:54 GMT
This is an automated email from the ASF dual-hosted git repository.

jbonofre pushed a commit to branch karaf-4.1.x
in repository https://gitbox.apache.org/repos/asf/karaf.git


The following commit(s) were added to refs/heads/karaf-4.1.x by this push:
     new cd1b8a9  [KARAF-5939] Attach correct artifact to the archive project
cd1b8a9 is described below

commit cd1b8a99869885614785f85699437b57b23ba6d1
Author: Jean-Baptiste Onofré <jbonofre@apache.org>
AuthorDate: Mon Nov 26 16:15:05 2018 +0100

    [KARAF-5939] Attach correct artifact to the archive project
---
 .../src/main/java/org/apache/karaf/tooling/ArchiveMojo.java         | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/ArchiveMojo.java
b/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/ArchiveMojo.java
index 2e03ba7..f8a561a 100644
--- a/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/ArchiveMojo.java
+++ b/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/ArchiveMojo.java
@@ -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,


Mime
View raw message