Set Sling properties before processing the feature
diff --git a/src/main/java/org/apache/sling/feature/launcher/impl/Bootstrap.java b/src/main/java/org/apache/sling/feature/launcher/impl/Bootstrap.java
index 5cbb0b1..2008940 100644
--- a/src/main/java/org/apache/sling/feature/launcher/impl/Bootstrap.java
+++ b/src/main/java/org/apache/sling/feature/launcher/impl/Bootstrap.java
@@ -73,10 +73,25 @@
this.config.getVariables().put("sling.home", this.config.getHomeDirectory().getAbsolutePath());
if (this.config.getVariables().get("repository.home") == null) {
this.config.getVariables().put("repository.home",
- this.config.getHomeDirectory().getAbsolutePath() + File.separatorChar + "repository");
+ this.config.getHomeDirectory().getAbsolutePath() + File.separatorChar + "repository");
}
this.config.getVariables().put("sling.launchpad",
- this.config.getHomeDirectory().getAbsolutePath() + "/launchpad");
+ this.config.getHomeDirectory().getAbsolutePath() + "/launchpad");
+
+ final Installation installation = this.config.getInstallation();
+ installation.setLogger(this.logger);
+
+ // set sling home, and use separate locations for launchpad and properties
+ installation.getFrameworkProperties().put("sling.home", this.config.getHomeDirectory().getAbsolutePath());
+ installation.getFrameworkProperties().put("sling.launchpad",
+ this.config.getHomeDirectory().getAbsolutePath() + "/launchpad");
+ if (!installation.getFrameworkProperties().containsKey("repository.home")) {
+ installation.getFrameworkProperties().put("repository.home",
+ this.config.getHomeDirectory().getAbsolutePath() + File.separatorChar + "repository");
+ }
+ installation.getFrameworkProperties().put("sling.properties", "conf/sling.properties");
+ installation.getFrameworkProperties().put("sling.feature",
+ getApplicationFeatureFile(this.config).toURI().toString());
}
public void run() {
@@ -229,7 +244,6 @@
this.logger.info("");
final Installation installation = config.getInstallation();
- installation.setLogger(this.logger);
// set sling home, and use separate locations for launchpad and properties
installation.getFrameworkProperties().put("sling.home", config.getHomeDirectory().getAbsolutePath());