You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by si...@apache.org on 2019/06/19 23:20:57 UTC
[sling-slingfeature-maven-plugin] branch feature_diff updated:
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
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 f9429ac 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
f9429ac is described below
commit f9429ac5090a6b998b74af28dea02b32c8b97b8d
Author: Simo Tripodi <st...@adobe.com>
AuthorDate: Thu Jun 20 01:20:48 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
updated [feature-diff] APIs usage
---
.../apache/sling/feature/maven/mojos/FeaturesDiffMojo.java | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
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 600ad52..dfe1fa2 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
@@ -45,9 +45,8 @@ import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.plugins.annotations.ResolutionScope;
-import org.apache.sling.feature.ArtifactId;
import org.apache.sling.feature.Feature;
-import org.apache.sling.feature.diff.DefaultDiffRequest;
+import org.apache.sling.feature.diff.DiffRequest;
import org.apache.sling.feature.io.json.FeatureJSONReader;
/**
@@ -118,14 +117,9 @@ public final class FeaturesDiffMojo extends AbstractIncludingFeatureMojo {
.append(current.getId().getClassifier())
.append("-upgrade");
- Feature featureDiff = compareFeatures(new DefaultDiffRequest()
+ Feature featureDiff = compareFeatures(new DiffRequest()
.setPrevious(previous)
- .setCurrent(current)
- .setResultId(new ArtifactId(current.getId().getGroupId(),
- current.getId().getArtifactId(),
- current.getId().getVersion(),
- classifier.toString(),
- current.getId().getType())));
+ .setCurrent(current));
File outputDiffFile = new File(mainOutputDir, classifier.append(".json").toString());