karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pie...@apache.org
Subject svn commit: r1442067 - /karaf/trunk/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/instances/CreateArchiveMojo.java
Date Mon, 04 Feb 2013 10:18:41 GMT
Author: pieber
Date: Mon Feb  4 10:18:40 2013
New Revision: 1442067

URL: http://svn.apache.org/viewvc?rev=1442067&view=rev
Log:
[KARAF-2160] Add option to only create tar.gz or zip archive in CreateArchiveMojo (thanks
to Christoph Gritschenberger for this patch)

Signed-off-by: Andreas Pieber <anpieber@gmail.com>

Modified:
    karaf/trunk/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/instances/CreateArchiveMojo.java

Modified: karaf/trunk/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/instances/CreateArchiveMojo.java
URL: http://svn.apache.org/viewvc/karaf/trunk/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/instances/CreateArchiveMojo.java?rev=1442067&r1=1442066&r2=1442067&view=diff
==============================================================================
--- karaf/trunk/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/instances/CreateArchiveMojo.java
(original)
+++ karaf/trunk/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/instances/CreateArchiveMojo.java
Mon Feb  4 10:18:40 2013
@@ -72,6 +72,19 @@ public class CreateArchiveMojo extends M
      */
     private File targetFile;
 
+    /**
+     * pack a assembly as a tar.gz archive
+     *
+     * @parameter
+     */
+    private boolean archiveTarGz = true;
+
+    /**
+     * pack a assembly as a zip archive
+     *
+     * @parameter
+     */
+    private boolean archiveZip = true;
 
     public void execute() throws MojoExecutionException, MojoFailureException {
         getLog().debug("Setting artifact file: " + targetFile);
@@ -79,8 +92,12 @@ public class CreateArchiveMojo extends M
         artifact.setFile(targetFile);
         try {
             //now pack up the server.
-            archive("tar.gz");
-            archive("zip");
+            if(archiveTarGz){
+                archive("tar.gz");
+            }
+            if(archiveZip) {
+                archive("zip");
+            }
         } catch (Exception e) {
             throw new MojoExecutionException("Could not archive plugin", e);
         }



Mime
View raw message