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 2018/11/20 10:19:04 UTC
[karaf] branch karaf-4.1.x updated: [KARAF-5939] Update and support
maven-install-plugin 3.0.0.M1
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 b1ff72e [KARAF-5939] Update and support maven-install-plugin 3.0.0.M1
b1ff72e is described below
commit b1ff72edbe66924dabb43ad808175a86abb88625
Author: Jean-Baptiste Onofré <jb...@apache.org>
AuthorDate: Wed Nov 14 15:24:06 2018 +0100
[KARAF-5939] Update and support maven-install-plugin 3.0.0.M1
---
.../assembly/src/main/resources/archetype-resources/pom.xml | 5 -----
archetypes/feature/src/main/resources/archetype-resources/pom.xml | 5 -----
pom.xml | 2 +-
.../src/main/java/org/apache/karaf/tooling/ArchiveMojo.java | 6 +++---
.../org/apache/karaf/tooling/features/GenerateDescriptorMojo.java | 8 +++++++-
5 files changed, 11 insertions(+), 15 deletions(-)
diff --git a/archetypes/assembly/src/main/resources/archetype-resources/pom.xml b/archetypes/assembly/src/main/resources/archetype-resources/pom.xml
index c4c1811..4072ed3 100644
--- a/archetypes/assembly/src/main/resources/archetype-resources/pom.xml
+++ b/archetypes/assembly/src/main/resources/archetype-resources/pom.xml
@@ -124,11 +124,6 @@
<version>^project.version^</version>
<extensions>true</extensions>
</plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-install-plugin</artifactId>
- <version>2.5.2</version>
- </plugin>
</plugins>
</pluginManagement>
<plugins>
diff --git a/archetypes/feature/src/main/resources/archetype-resources/pom.xml b/archetypes/feature/src/main/resources/archetype-resources/pom.xml
index 98f5fb8..47a5edc 100644
--- a/archetypes/feature/src/main/resources/archetype-resources/pom.xml
+++ b/archetypes/feature/src/main/resources/archetype-resources/pom.xml
@@ -41,11 +41,6 @@
<version>^project.version^</version>
<extensions>true</extensions>
</plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-install-plugin</artifactId>
- <version>2.5.2</version>
- </plugin>
</plugins>
</pluginManagement>
<plugins>
diff --git a/pom.xml b/pom.xml
index 8bb15a7..cb65c0c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1683,7 +1683,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
- <version>2.5.2</version>
+ <version>3.0.0-M1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
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 a906dae..2e03ba7 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,9 +113,6 @@ public class ArchiveMojo extends MojoSupport {
private boolean useSymLinks = false;
public void execute() throws MojoExecutionException, MojoFailureException {
- getLog().debug("Setting artifact file: " + targetFile);
- org.apache.maven.artifact.Artifact artifact = project.getArtifact();
- artifact.setFile(targetFile);
try {
//now pack up the server.
if(archiveTarGz){
@@ -146,6 +143,9 @@ public class ArchiveMojo extends MojoSupport {
if (attach) {
projectHelper.attachArtifact(project, artifact1.getType(), classifier, target1);
}
+
+ artifact1.setFile(target1);
+ project.setArtifact(artifact1);
}
public File archive(File source, File dest, Artifact artifact) throws //ArchiverException,
diff --git a/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/features/GenerateDescriptorMojo.java b/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/features/GenerateDescriptorMojo.java
index 253793a..d26be8e 100644
--- a/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/features/GenerateDescriptorMojo.java
+++ b/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/features/GenerateDescriptorMojo.java
@@ -343,7 +343,12 @@ public class GenerateDescriptorMojo extends MojoSupport {
throw new MojoExecutionException("Could not create directory for features file: " + dir);
}
filter(inputFile, outputFile);
- projectHelper.attachArtifact(project, attachmentArtifactType, attachmentArtifactClassifier, outputFile);
+ getLog().info("Generation not enabled");
+ getLog().info("Attaching artifact");
+ //projectHelper.attachArtifact(project, attachmentArtifactType, attachmentArtifactClassifier, outputFile);
+ Artifact artifact = factory.createArtifactWithClassifier(project.getGroupId(), project.getArtifactId(), project.getVersion(), attachmentArtifactType, attachmentArtifactClassifier);
+ artifact.setFile(outputFile);
+ project.setArtifact(artifact);
return;
}
}
@@ -361,6 +366,7 @@ public class GenerateDescriptorMojo extends MojoSupport {
} finally {
out.close();
}
+ getLog().info("Attaching features XML");
// now lets attach it
projectHelper.attachArtifact(project, attachmentArtifactType, attachmentArtifactClassifier, outputFile);
} else {