in src/main/java/org/apache/sling/maven/slingstart/run/StartMojo.java [244:279]
private void createLaunchpadRunnerProperties(final Collection<ServerConfiguration> configurations)
throws MojoExecutionException {
// create properties
OutputStream writer = null;
final Properties props = new Properties();
try {
writer = new FileOutputStream(this.systemPropertiesFile);
// disable sling startup check
props.put("launchpad.skip.startupcheck", "true");
// write out all instances
int index = 0;
for (final ServerConfiguration launchpadConfiguration : configurations) {
index++;
props.put("launchpad.instance.id." + String.valueOf(index), launchpadConfiguration.getId());
String runMode = launchpadConfiguration.getRunmode();
if ( runMode == null ) {
runMode = "";
}
props.put("launchpad.instance.runmode." + String.valueOf(index), runMode);
props.put("launchpad.instance.server." + String.valueOf(index), launchpadConfiguration.getServer());
props.put("launchpad.instance.port." + String.valueOf(index), launchpadConfiguration.getPort());
props.put("launchpad.instance.contextPath." + String.valueOf(index), launchpadConfiguration.getContextPath());
final String url = createServerUrl(launchpadConfiguration);
props.put("launchpad.instance.url." + String.valueOf(index), url);
}
props.put("launchpad.instances", String.valueOf(index));
props.store(writer, null);
} catch (final IOException e) {
throw new MojoExecutionException(e.getLocalizedMessage(), e);
} finally {
IOUtils.closeQuietly(writer);
}
}