This is an automated email from the ASF dual-hosted git repository.
simonetripodi pushed a commit to branch feature_diff
in repository
https://gitbox.apache.org/repos/asf/sling-slingfeature-maven-plugin.git
The following commit(s) were added to refs/heads/feature_diff by this push:
new 1109778 SLING-8468 - [slingfeature-m-p] donate a new MOJO which is
able to scan and detect differences between different versions of the same
Feature model
1109778 is described below
commit 11097788d580badf3e30b73c643be8cdc235dd61
Author: Simo Tripodi <[email protected]>
AuthorDate: Thu Jun 20 01:25:51 2019 +0200
SLING-8468 - [slingfeature-m-p] donate a new MOJO which is able to scan
and detect differences between different versions of the same Feature
model
attach the diff json Feature file to the project
---
.../java/org/apache/sling/feature/maven/mojos/FeaturesDiffMojo.java | 6 ++++++
1 file changed, 6 insertions(+)
diff --git
a/src/main/java/org/apache/sling/feature/maven/mojos/FeaturesDiffMojo.java
b/src/main/java/org/apache/sling/feature/maven/mojos/FeaturesDiffMojo.java
index a0289f4..97e4683 100644
--- a/src/main/java/org/apache/sling/feature/maven/mojos/FeaturesDiffMojo.java
+++ b/src/main/java/org/apache/sling/feature/maven/mojos/FeaturesDiffMojo.java
@@ -48,6 +48,7 @@ import org.apache.maven.plugins.annotations.ResolutionScope;
import org.apache.sling.feature.Feature;
import org.apache.sling.feature.diff.DiffRequest;
import org.apache.sling.feature.io.json.FeatureJSONReader;
+import org.apache.sling.feature.maven.FeatureConstants;
/**
* Compares different versions of the same Feature Model.
@@ -122,6 +123,11 @@ public final class FeaturesDiffMojo extends
AbstractIncludingFeatureMojo {
} catch (IOException e) {
throw new MojoExecutionException("An error occurred while
serializing Feature diff to " + outputDiffFile, e);
}
+
+ projectHelper.attachArtifact(project,
+ FeatureConstants.PACKAGING_FEATURE,
+ featureDiff.getId().getClassifier(),
+ outputDiffFile);
}
private Feature getPreviousFeature(Feature current) throws
MojoExecutionException, MojoFailureException {