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/08 14:52:41 UTC
[sling-slingfeature-maven-plugin] 01/01: SLING-7988 - Allow
Analyzer include/exclude tasks by id,
in order to enable specific Tasks in the Maven plugin
This is an automated email from the ASF dual-hosted git repository.
simonetripodi pushed a commit to branch include-exclude-tasks
in repository https://gitbox.apache.org/repos/asf/sling-slingfeature-maven-plugin.git
commit 66d7886b1c56911e74dcf64659d3135564dbc823
Author: Simo Tripodi <st...@adobe.com>
AuthorDate: Mon Oct 8 16:52:28 2018 +0200
SLING-7988 - Allow Analyzer include/exclude tasks by id, in order to
enable specific Tasks in the Maven plugin
allow the users configure the Analyzer tasks by conventional
include/exclude pattern
---
.../apache/sling/feature/maven/mojos/AnalyseFeaturesMojo.java | 10 +++++++++-
1 file changed, 9 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 84a9389..0e5af38 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
@@ -19,6 +19,7 @@ package org.apache.sling.feature.maven.mojos;
import java.io.File;
import java.io.IOException;
import java.util.Collection;
+import java.util.Set;
import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
import org.apache.maven.artifact.resolver.ArtifactResolver;
@@ -27,6 +28,7 @@ import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.plugins.annotations.Component;
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;
@@ -51,6 +53,12 @@ public class AnalyseFeaturesMojo extends AbstractFeatureMojo {
@Component
ArtifactResolver artifactResolver;
+ @Parameter
+ Set<String> includeTasks;
+
+ @Parameter
+ Set<String> excludeTasks;
+
@Override
public void execute() throws MojoExecutionException, MojoFailureException {
final ArtifactProvider am = new ArtifactProvider() {
@@ -69,7 +77,7 @@ public class AnalyseFeaturesMojo extends AbstractFeatureMojo {
getLog().debug("Scanner successfully set up");
getLog().debug("Setting up the Analyser...");
- final Analyser analyser = new Analyser(scanner);
+ final Analyser analyser = new Analyser(scanner, includeTasks, excludeTasks);
getLog().debug("Analyser successfully set up");
getLog().debug("Retrieving Feature files...");