[
https://issues.apache.org/jira/browse/SLING-8468?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16860096#comment-16860096
]
Simone Tripodi commented on SLING-8468:
---------------------------------------
Thanks [~bosschaert] for following up, very appreciated!
Replies inline!
bq. What does the report of the mojo look like?
You can find a small sample on
https://github.com/apache/sling-whiteboard/blob/master/feature-diff/src/test/resources/org/apache/sling/feature/diff/io/json/expectedDiff.json
- there are stuff I don't like, but that's just the entry point where the
discussion starts!
bq. 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?
Not yet, this is something I need to add, but that's not a big deal!
bq. 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.
yes, it has such flexibility - it does not take care of the ordering, it just
compares if _left_ elements disappeared on _right_, new elements appeared on
_right_ or if one or more elements are updated, the order is not important!
bq. 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?
The MOJO is just a wrapper of
https://github.com/apache/sling-whiteboard/tree/master/feature-diff APIs, we
can embed them wherever we want to!
> [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)