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 2018/10/09 11:37:57 UTC
[sling-slingfeature-maven-plugin] branch SLING-7997 created (now
7699599)
This is an automated email from the ASF dual-hosted git repository.
simonetripodi pushed a change to branch SLING-7997
in repository https://gitbox.apache.org/repos/asf/sling-slingfeature-maven-plugin.git.
at 7699599 SLING-7997 - Make the AnalyseFeaturesMojo been able to include/exclude Features to be analyzed
This branch includes the following new commits:
new 7699599 SLING-7997 - Make the AnalyseFeaturesMojo been able to include/exclude Features to be analyzed
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[sling-slingfeature-maven-plugin] 01/01: SLING-7997 - Make the
AnalyseFeaturesMojo been able to include/exclude Features to be analyzed
Posted by si...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
simonetripodi pushed a commit to branch SLING-7997
in repository https://gitbox.apache.org/repos/asf/sling-slingfeature-maven-plugin.git
commit 769959901594baffb1d00a9387bcf224d136f5b0
Author: Simo Tripodi <st...@adobe.com>
AuthorDate: Tue Oct 9 13:37:44 2018 +0200
SLING-7997 - Make the AnalyseFeaturesMojo been able to include/exclude
Features to be analyzed
initial implementation of include/exclude pattern for Features to be
analyzed
---
.../sling/feature/maven/mojos/AnalyseFeaturesMojo.java | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/src/main/java/org/apache/sling/feature/maven/mojos/AnalyseFeaturesMojo.java b/src/main/java/org/apache/sling/feature/maven/mojos/AnalyseFeaturesMojo.java
index 0e5af38..2ede5a8 100644
--- a/src/main/java/org/apache/sling/feature/maven/mojos/AnalyseFeaturesMojo.java
+++ b/src/main/java/org/apache/sling/feature/maven/mojos/AnalyseFeaturesMojo.java
@@ -59,6 +59,12 @@ public class AnalyseFeaturesMojo extends AbstractFeatureMojo {
@Parameter
Set<String> excludeTasks;
+ @Parameter
+ Set<String> includeFeatures;
+
+ @Parameter
+ Set<String> excludeFeatures;
+
@Override
public void execute() throws MojoExecutionException, MojoFailureException {
final ArtifactProvider am = new ArtifactProvider() {
@@ -90,7 +96,16 @@ public class AnalyseFeaturesMojo extends AbstractFeatureMojo {
getLog().debug("Starting Features analysis...");
}
- for(final Feature f : features) {
+ for (final Feature f : features) {
+ String featureId = f.getId().toMvnId();
+ boolean included = includeFeatures != null ? includeFeatures.contains(featureId) : true;
+ boolean excluded = excludeFeatures != null ? excludeFeatures.contains(featureId) : false;
+
+ if (!included || excluded) {
+ getLog().debug("Feature '" + featureId + "' will not be included in the Analysis");
+ continue;
+ }
+
try {
getLog().debug("Analyzing Feature " + f.getId() + "...");
analyser.analyse(f);