This is an automated email from the ASF dual-hosted git repository.
cziegeler pushed a commit to branch master
in repository
https://gitbox.apache.org/repos/asf/sling-slingfeature-maven-plugin.git
The following commit(s) were added to refs/heads/master by this push:
new 200a793 SLING-7961 : Adjust feature file reading to latest state
200a793 is described below
commit 200a793a5bfce4c0eb3698353eb34687411cd79f
Author: Carsten Ziegeler <[email protected]>
AuthorDate: Sun Sep 30 14:40:30 2018 +0200
SLING-7961 : Adjust feature file reading to latest state
---
.../sling/feature/maven/mojos/AggregateFeaturesMojo.java | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git
a/src/main/java/org/apache/sling/feature/maven/mojos/AggregateFeaturesMojo.java
b/src/main/java/org/apache/sling/feature/maven/mojos/AggregateFeaturesMojo.java
index 8409039..5aec2af 100644
---
a/src/main/java/org/apache/sling/feature/maven/mojos/AggregateFeaturesMojo.java
+++
b/src/main/java/org/apache/sling/feature/maven/mojos/AggregateFeaturesMojo.java
@@ -245,6 +245,18 @@ public class AggregateFeaturesMojo extends
AbstractFeatureMojo {
featureMap.putAll(scanner.getIncluded());
}
}
+ if ( !fc.excludes.isEmpty() ) {
+ for(final String exclude : fc.excludes) {
+ if ( !exclude.contains("*") ) {
+ final FeatureScanner scanner = new
FeatureScanner(contextFeatures, prefix);
+ scanner.setIncludes(new String[] {exclude});
+ scanner.scan();
+ if ( scanner.getIncluded().isEmpty() ) {
+ throw new IOException("Non pattern exclude " + exclude
+ " not found.");
+ }
+ }
+ }
+ }
}
private Feature readFeatureFromFile(File f) throws IOException {