[ 
https://issues.apache.org/jira/browse/SLING-8468?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16860092#comment-16860092
 ] 

David Bosschaert commented on SLING-8468:
-----------------------------------------

Hi Simo,

Thanks for proposing this!

I have some questions... :)
 * What does the report of the mojo look like?
 * Is it possible to specify that the comparison ignores certain things from 
the comparison. For example can I state that the feature ID be ignored during 
compares, or for example the bundle start level attribute on bundles?
 * Is the tool flexible wrt the ordering of elements in the feature files? For 
example the order in which configurations are specified is not important and 
should not be shown as a difference.
 * Currenty it's a mojo, but I can think of this as a standalone tool as well. 
It can be useful to run in the context where no pom.xml file is available. 
Would this be possible?

> [slingfeature-m-p] donate a new MOJO which is able to scan and detect 
> differences between different versions of the same Feature model
> --------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: SLING-8468
>                 URL: https://issues.apache.org/jira/browse/SLING-8468
>             Project: Sling
>          Issue Type: New Feature
>          Components: Feature Model, Maven Plugins and Archetypes
>    Affects Versions: slingfeature-maven-plugin 1.0.2
>            Reporter: Simone Tripodi
>            Assignee: Simone Tripodi
>            Priority: Major
>             Fix For: slingfeature-maven-plugin 1.0.4
>
>
> I would like to donate a new {{features-diff}} MOJO I developed in the spare 
> time that could be helpful detecting systems evolution.
> I got inspiration from my previous contribution of the [Felix 
> Baseline|https://felix.apache.org/components/bundle-plugin/baseline-mojo.html]
>  MOJO, users can configure the feature selection (inherited by the 
> {{AbstractIncludingFeatureMojo}}) and the previously released version of the 
> they are interested comparing, i.e.:
> {noformat}
>           <plugin>
>             <groupId>org.apache.sling</groupId>
>             <artifactId>slingfeature-maven-plugin</artifactId>
>             <executions>
>               <execution>
>                 <id>features-diff</id>
>                 <phase>package</phase>
>                 <goals>
>                   <goal>features-diff</goal>
>                 </goals>
>                 <configuration>
>                   <comparisonVersion>1.0.2</comparisonVersion>
>                   <selection>
>                     <includeClassifier>cloud-ready</includeClassifier>
>                     <includeClassifier>base</includeClassifier>
>                   </selection>
> {noformat}
> then the plugin will take care of resolving the configured version of 
> selected classified Feature and compare each other, producing the outputs in 
> the {{target/features-diff/<classifier>.diff.json}} files, enlisting for each 
> Feature section what was added/removed/changed.
> The new MOJO relies on the [Feature Model API Regions 
> model|https://github.com/apache/sling-org-apache-sling-feature-apiregions-model]
>  and the [Feature 
> Diff|https://github.com/apache/sling-whiteboard/tree/master/feature-diff] 
> (still in the whiteboard) which contains the core implementation of the diff 
> tool.
> I will start pushing the MOJO in a separated branch in order to discuss the 
> development evolution.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to