[
https://issues.apache.org/jira/browse/KARAF-5939?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16692948#comment-16692948
]
ASF GitHub Bot commented on KARAF-5939:
---------------------------------------
jbonofre closed pull request #654: [KARAF-5939] Update and support
maven-install-plugin 3.0.0.M1
URL: https://github.com/apache/karaf/pull/654
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/archetypes/assembly/src/main/resources/archetype-resources/pom.xml
b/archetypes/assembly/src/main/resources/archetype-resources/pom.xml
index c4c181198b..4072ed37c6 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 98f5fb8598..47a5edce97 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/examples/karaf-maven-example/karaf-maven-example-assembly/pom.xml
b/examples/karaf-maven-example/karaf-maven-example-assembly/pom.xml
index 78c3e6ec9a..1fa8861ea9 100644
--- a/examples/karaf-maven-example/karaf-maven-example-assembly/pom.xml
+++ b/examples/karaf-maven-example/karaf-maven-example-assembly/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache.karaf.examples</groupId>
<artifactId>karaf-maven-example</artifactId>
- <version>4.2.1-SNAPSHOT</version>
+ <version>4.2.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
@@ -81,4 +81,4 @@
</plugins>
</build>
-</project>
\ No newline at end of file
+</project>
diff --git a/examples/karaf-maven-example/karaf-maven-example-kar/pom.xml
b/examples/karaf-maven-example/karaf-maven-example-kar/pom.xml
index 36371ec57d..ddc8712d7b 100644
--- a/examples/karaf-maven-example/karaf-maven-example-kar/pom.xml
+++ b/examples/karaf-maven-example/karaf-maven-example-kar/pom.xml
@@ -24,13 +24,13 @@
<parent>
<groupId>org.apache.karaf.examples</groupId>
<artifactId>karaf-maven-example</artifactId>
- <version>4.2.1-SNAPSHOT</version>
+ <version>4.2.2-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>karaf-maven-example-kar</artifactId>
<name>Apache Karaf :: Examples :: Maven :: KAR</name>
- <packaging>pom</packaging>
+ <packaging>kar</packaging>
<build>
<plugins>
@@ -38,18 +38,7 @@
<groupId>org.apache.karaf.tooling</groupId>
<artifactId>karaf-maven-plugin</artifactId>
<version>${project.version}</version>
- <executions>
- <execution>
- <id>kar</id>
- <goals>
- <goal>kar</goal>
- </goals>
- <configuration>
- <!-- <classifier>my</classifier> -->
-
<featuresFile>${basedir}/src/features/features-repo.xml</featuresFile>
- </configuration>
- </execution>
- </executions>
+ <extensions>true</extensions>
</plugin>
</plugins>
</build>
diff --git
a/examples/karaf-maven-example/karaf-maven-example-kar/src/features/features-repo.xml
b/examples/karaf-maven-example/karaf-maven-example-kar/src/main/feature/features-repo.xml
similarity index 100%
rename from
examples/karaf-maven-example/karaf-maven-example-kar/src/features/features-repo.xml
rename to
examples/karaf-maven-example/karaf-maven-example-kar/src/main/feature/features-repo.xml
diff --git a/pom.xml b/pom.xml
index e64ae8632e..40d645a615 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1829,7 +1829,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 a906dae719..2e03ba7b1b 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 @@
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 @@ private void archive(String type) throws IOException {
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 b644540d93..89066224a6 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
@@ -342,7 +342,12 @@ public void execute() throws MojoExecutionException,
MojoFailureException {
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;
}
}
@@ -357,6 +362,7 @@ public void execute() throws MojoExecutionException,
MojoFailureException {
try (PrintStream out = new PrintStream(new
FileOutputStream(outputFile))) {
writeFeatures(out);
}
+ getLog().info("Attaching features XML");
// now lets attach it
projectHelper.attachArtifact(project, attachmentArtifactType,
attachmentArtifactClassifier, outputFile);
} else {
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> karaf-assembly packaging fails with m-i-p 3.0.0-M1
> --------------------------------------------------
>
> Key: KARAF-5939
> URL: https://issues.apache.org/jira/browse/KARAF-5939
> Project: Karaf
> Issue Type: Bug
> Components: karaf
> Affects Versions: 4.0.10
> Reporter: Mark Derricutt
> Assignee: Jean-Baptiste Onofré
> Priority: Minor
> Fix For: 4.0.11, 4.2.2, 4.1.7
>
>
> The Apache Maven team just released 3.0.0-M1 of the maven-install-plugin,
> which contains
> MINSTALL-118 - our project is using karaf-maven-plugin 4.0.10 and this seems
> to trip up with:
>
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-install-plugin:3.0.0-M1:install
> (default-install) on project smx3.karaf.defaultconfig:
> NoFileAssignedException: The packaging plugin for this project did not assign
> a main file to the project but it has attachments. Change packaging to 'pom'.
> -> [Help 1]
>
> I don't know if this has been fixed in later releases of karaf-maven-plugin,
> or if a patch version of 4.0.10.x will be made, but for now will lock down
> our builds install-plugin version.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)