You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by jb...@apache.org on 2016/08/09 14:19:29 UTC
[1/2] karaf git commit: [KARAF-4462] Allow control of attachment in
the archive mojo
Repository: karaf
Updated Branches:
refs/heads/master e3773d890 -> ae9e012ff
[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/279abc10
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/279abc10
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/279abc10
Branch: refs/heads/master
Commit: 279abc10b30816ed3739c8b771273b2b3ce65398
Parents: e3773d8
Author: Benson Margulies <be...@basistech.com>
Authored: Fri Apr 1 19:27:03 2016 -0400
Committer: Jean-Baptiste Onofr� <jb...@apache.org>
Committed: Tue Aug 9 16:18:38 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/279abc10/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,
[2/2] karaf git commit: [KARAF-4462] This closes #173
Posted by jb...@apache.org.
[KARAF-4462] This closes #173
Project: http://git-wip-us.apache.org/repos/asf/karaf/repo
Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/ae9e012f
Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/ae9e012f
Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/ae9e012f
Branch: refs/heads/master
Commit: ae9e012ff0520ac6308e6436c8c898dad23411f9
Parents: e3773d8 279abc1
Author: Jean-Baptiste Onofr� <jb...@apache.org>
Authored: Tue Aug 9 16:19:18 2016 +0200
Committer: Jean-Baptiste Onofr� <jb...@apache.org>
Committed: Tue Aug 9 16:19:18 2016 +0200
----------------------------------------------------------------------
.../java/org/apache/karaf/tooling/ArchiveMojo.java | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
----------------------------------------------------------------------