values.put(property.getId(), value);
}
System.out.println("Creating server runtime...");
final RuntimeWorkingCopy rwc = (RuntimeWorkingCopy) runtimeType.createRuntime(runtimeType.getName() + " GENERATED", monitor);
if (!pf.containsKey("location"))
{
System.out.println("ERROR: no location property in properties file: " + propertiesFile);
return;
}
rwc.setLocation(new Path(pf.getProperty("location")));
rwc.setName(runtimeType.getName() + " GENERATED");
rwc.setStub(false);
final Iterator it = runtimeProperties.entrySet().iterator();
while (it.hasNext())
{
final Map.Entry e = (Entry) it.next();
rwc.setAttribute((String) e.getKey(), (String) e.getValue());
}
Map m = rwc.getAttribute("generic_server_instance_properties", (Map) null);
m.put("key", "generic_server_instance_properties");
m.putAll(runtimeProperties);
rwc.setAttribute("generic_server_instance_properties", m);
rwc.setAttribute("runtime-type-id", runtimeType.getId());
rwc.setAttribute("server_definition_id", serverRuntime.getId());
final IRuntime runtime = rwc.save(true, monitor);
System.out.println("Server runtime created: " + runtime.getName());
System.out.println("Creating server instance...");