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 6ab893f Throw exception if no features are found for an aggregate
6ab893f is described below
commit 6ab893fab393122a4b9f89245c6027a4b97fd94e
Author: Carsten Ziegeler <[email protected]>
AuthorDate: Tue Oct 2 17:07:03 2018 +0200
Throw exception if no features are found for an aggregate
---
.../org/apache/sling/feature/maven/mojos/AggregateFeaturesMojo.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
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 5aec2af..e053db8 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
@@ -112,7 +112,9 @@ public class AggregateFeaturesMojo extends
AbstractFeatureMojo {
// get the map of features for this aggregate
final Map<ArtifactId, Feature> featureMap = readFeatures(aggregates,
projectFeatures);
-
+ if ( featureMap.isEmpty() ) {
+ throw new MojoExecutionException("No features found for aggregate
with classifier " + aggregateClassifier);
+ }
KeyValueMap variableOverrides = new KeyValueMap();
if (variables != null) {
for (Map.Entry<String, String> entry : variables.entrySet()) {