This is an automated email from the ASF dual-hosted git repository.

davidb pushed a commit to branch master
in repository 
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-installer-factory-feature.git

commit 1497e9f811db5d1110dc4c540f8a7c5e75e6b242
Author: Carsten Ziegeler <[email protected]>
AuthorDate: Wed Apr 29 13:39:04 2020 +0200

    Add error reason to finish state
---
 pom.xml                                                             | 2 +-
 .../sling/installer/factory/model/impl/InstallFeatureModelTask.java | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index 814b2ae..4d201eb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -47,7 +47,7 @@
                 <artifactId>maven-javadoc-plugin</artifactId>
                 <configuration>
                     <excludePackageNames>
-                        org.apache.sling.installer.factory.model.impl
+                        org.apache.sling.installer.factory.feature.model.impl
                     </excludePackageNames>
                 </configuration>
             </plugin>
diff --git 
a/src/main/java/org/apache/sling/installer/factory/model/impl/InstallFeatureModelTask.java
 
b/src/main/java/org/apache/sling/installer/factory/model/impl/InstallFeatureModelTask.java
index f60c0cb..7dbb111 100644
--- 
a/src/main/java/org/apache/sling/installer/factory/model/impl/InstallFeatureModelTask.java
+++ 
b/src/main/java/org/apache/sling/installer/factory/model/impl/InstallFeatureModelTask.java
@@ -80,13 +80,13 @@ public class InstallFeatureModelTask extends 
AbstractFeatureModelTask {
             final String featureJson = (String) 
resource.getAttribute(FeatureModelInstallerPlugin.ATTR_MODEL);
             if (featureJson == null) {
                 ctx.log("Unable to install feature model resource {} : no 
model found", resource);
-                this.getResourceGroup().setFinishState(ResourceState.IGNORED);
+                this.getResourceGroup().setFinishState(ResourceState.IGNORED, 
null, "No model found");
             } else {
                 boolean success = false;
                 final List<InstallableResource> result = 
this.transform(featureJson, resource);
                 if (result == null) {
                     ctx.log("Unable to install feature model resource {} : 
unable to create resources", resource);
-                    
this.getResourceGroup().setFinishState(ResourceState.IGNORED);
+                    
this.getResourceGroup().setFinishState(ResourceState.IGNORED, null, "Unable to 
create resources");
                 } else {
                     if (!result.isEmpty()) {
                         final OsgiInstaller installer = 
this.getService(OsgiInstaller.class);
@@ -97,7 +97,7 @@ public class InstallFeatureModelTask extends 
AbstractFeatureModelTask {
                         } else {
                             ctx.log("Unable to install feature model resource 
{} : unable to get OSGi installer",
                                     resource);
-                            
this.getResourceGroup().setFinishState(ResourceState.IGNORED);
+                            
this.getResourceGroup().setFinishState(ResourceState.IGNORED, null,  "Unable to 
get OSGi installer");
                             return;
                         }
                     }

Reply via email to