karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbono...@apache.org
Subject [38/50] [abbrv] karaf git commit: [KARAF-4462] Allow control of attachment in the archive mojo
Date Mon, 22 Aug 2016 09:30:36 GMT
[KARAF-4462] Allow control of attachment in the archive mojo


Project: http://git-wip-us.apache.org/repos/asf/karaf/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/3e7e0c7b
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/3e7e0c7b
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/3e7e0c7b

Branch: refs/heads/master
Commit: 3e7e0c7b8bbe33f39acada2e712abe4c4a2e5396
Parents: b57db85
Author: Benson Margulies <benson@basistech.com>
Authored: Fri Apr 1 19:27:03 2016 -0400
Committer: Jean-Baptiste Onofré <jbonofre@apache.org>
Committed: Mon Aug 22 11:29:21 2016 +0200

----------------------------------------------------------------------
 .../java/org/apache/karaf/tooling/ArchiveMojo.java  | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/karaf/blob/3e7e0c7b/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/ArchiveMojo.java
----------------------------------------------------------------------
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 c8362ac..de8b093 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
@@ -91,6 +91,18 @@ public class ArchiveMojo extends MojoSupport {
     private boolean archiveZip = true;
 
     /**
+     * Whether to attach the resulting assembly to the project as an artifact.
+     */
+    @Parameter(defaultValue="true")
+    private boolean attach = true;
+
+    /**
+     * If supplied, the classifer for the artifact when attached.
+     */
+    @Parameter
+    private String classifier;
+
+    /**
      * use symbolic links in tar.gz or zip archives
      *
      * Symbolic links are not very well supported by windows Platform.
@@ -121,7 +133,9 @@ public class ArchiveMojo extends MojoSupport {
 	private void archive(String type) throws IOException {
         Artifact artifact1 = factory.createArtifactWithClassifier(project.getArtifact().getGroupId(),
project.getArtifact().getArtifactId(), project.getArtifact().getVersion(), type, "bin");
         File target1 = archive(targetServerDirectory, destDir, artifact1);
-        projectHelper.attachArtifact( project, artifact1.getType(), null, target1 );
+        if (attach) {
+            projectHelper.attachArtifact(project, artifact1.getType(), classifier, target1);
+        }
     }
 
     public File archive(File source, File dest, Artifact artifact) throws //ArchiverException,


Mime
View raw message