This is an automated email from the ASF dual-hosted git repository.

cziegeler pushed a commit to branch master
in repository 
https://gitbox.apache.org/repos/asf/sling-slingfeature-maven-plugin.git


The following commit(s) were added to refs/heads/master by this push:
     new 774860e  Move enhancing the feature from project info to correct place
774860e is described below

commit 774860ea6ac18ae4e8542d83190401a94bac14ec
Author: Carsten Ziegeler <[email protected]>
AuthorDate: Sat Oct 20 10:31:30 2018 +0200

    Move enhancing the feature from project info to correct place
---
 .../org/apache/sling/feature/maven/mojos/AggregateFeaturesMojo.java | 6 ++++--
 .../org/apache/sling/feature/maven/mojos/AttachFeaturesMojo.java    | 2 --
 .../java/org/apache/sling/feature/maven/mojos/RepositoryMojo.java   | 2 --
 3 files changed, 4 insertions(+), 6 deletions(-)

diff --git 
a/src/main/java/org/apache/sling/feature/maven/mojos/AggregateFeaturesMojo.java 
b/src/main/java/org/apache/sling/feature/maven/mojos/AggregateFeaturesMojo.java
index e053db8..fd3b1a7 100644
--- 
a/src/main/java/org/apache/sling/feature/maven/mojos/AggregateFeaturesMojo.java
+++ 
b/src/main/java/org/apache/sling/feature/maven/mojos/AggregateFeaturesMojo.java
@@ -146,9 +146,11 @@ public class AggregateFeaturesMojo extends 
AbstractFeatureMojo {
                 ServiceLoader.load(FeatureExtensionHandler.class).iterator(), 
Spliterator.ORDERED), false)
             .toArray(FeatureExtensionHandler[]::new));
 
-        ArtifactId newFeatureID = new ArtifactId(project.getGroupId(), 
project.getArtifactId(),
+        final ArtifactId newFeatureID = new ArtifactId(project.getGroupId(), 
project.getArtifactId(),
                 project.getVersion(), aggregateClassifier, 
FeatureConstants.PACKAGING_FEATURE);
-        Feature result = FeatureBuilder.assemble(newFeatureID, builderContext, 
featureMap.values().toArray(new Feature[] {}));
+        final Feature result = FeatureBuilder.assemble(newFeatureID, 
builderContext, featureMap.values().toArray(new Feature[] {}));
+
+        ProjectHelper.setProjectInfo(project, result);
 
         // Add feature to map of features
         projectFeatures.put(key, result);
diff --git 
a/src/main/java/org/apache/sling/feature/maven/mojos/AttachFeaturesMojo.java 
b/src/main/java/org/apache/sling/feature/maven/mojos/AttachFeaturesMojo.java
index ee637cc..bfe4529 100644
--- a/src/main/java/org/apache/sling/feature/maven/mojos/AttachFeaturesMojo.java
+++ b/src/main/java/org/apache/sling/feature/maven/mojos/AttachFeaturesMojo.java
@@ -52,8 +52,6 @@ public class AttachFeaturesMojo extends AbstractFeatureMojo {
     private void attach(final Feature feature,
             final String classifier)
     throws MojoExecutionException {
-        ProjectHelper.setProjectInfo(project, feature);
-
         // write the feature
         final File outputFile = new File(this.getTmpDir(), "feature-" + 
classifier + ".json");
         outputFile.getParentFile().mkdirs();
diff --git 
a/src/main/java/org/apache/sling/feature/maven/mojos/RepositoryMojo.java 
b/src/main/java/org/apache/sling/feature/maven/mojos/RepositoryMojo.java
index f90d471..f9a1423 100644
--- a/src/main/java/org/apache/sling/feature/maven/mojos/RepositoryMojo.java
+++ b/src/main/java/org/apache/sling/feature/maven/mojos/RepositoryMojo.java
@@ -22,10 +22,8 @@ import java.io.FileWriter;
 import java.io.IOException;
 import java.io.Reader;
 import java.io.Writer;
-import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
-import java.util.Set;
 
 import org.apache.commons.io.FileUtils;
 import org.apache.maven.artifact.Artifact;

Reply via email to