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 7c321bf  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
7c321bf is described below

commit 7c321bf4b80e5c7d0005addb725badcfbe7efa20
Author: Simo Tripodi <[email protected]>
AuthorDate: Thu Jun 20 01:23:19 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
    
    use the computed classifier to name the target file
---
 .../org/apache/sling/feature/maven/mojos/FeaturesDiffMojo.java | 10 +---------
 1 file changed, 1 insertion(+), 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 dfe1fa2..a0289f4 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
@@ -109,19 +109,11 @@ public final class FeaturesDiffMojo extends 
AbstractIncludingFeatureMojo {
 
         getLog().info("Comparing current " + current + " to previous " + 
previous);
 
-        StringBuilder classifier = new StringBuilder()
-                                   .append(previous.getId().getVersion())
-                                   .append("-to-")
-                                   .append(current.getId().getVersion())
-                                   .append('-')
-                                   .append(current.getId().getClassifier())
-                                   .append("-upgrade");
-
         Feature featureDiff = compareFeatures(new DiffRequest()
                                               .setPrevious(previous)
                                               .setCurrent(current));
 
-        File outputDiffFile = new File(mainOutputDir, 
classifier.append(".json").toString());
+        File outputDiffFile = new File(mainOutputDir, 
featureDiff.getId().getClassifier().concat(".json"));
 
         getLog().info("Rendering differences to file " + outputDiffFile);
 

Reply via email to