protected long pause;
public void execute() throws MojoExecutionException, MojoFailureException {
- if ("bundles".equals(project.getArtifact().getType())) {
- System.out.println("Skip artifact of type bundles "
- + artifactToString(project.getArtifact()));
+ if (PACKAGING_BUNDLE.equals(project.getArtifact().getType())) {
+ System.out.println("Skip artifact of type " + PACKAGING_BUNDLE
+ + " " + artifactToString(project.getArtifact()));
return;
}
protected void execNonForked(LocationsStruct locationsStruct)
throws Exception {
// Set defaults
- if (args == null)
- args = defaultArgs;
+ if (args == null) {
+ if (fork)
+ args = defaultArgs;
+ else
+ args = new String[] { "-console", "-configuration",
+ execDir.getPath() + File.separator + "conf", "-data",
+ execDir.getPath() + File.separator + "data" };
+ }
// if (!execDir.exists())
// execDir.mkdirs();
List cmdList = new ArrayList();
// System properties
- if (!systemProperties.containsKey("osgi.bundles"))
+ if (!systemProperties.containsKey("osgi.bundles")) {
+ if (locationsStruct.osgiBootArtifact == null)
+ throw new Exception("No SLC OSGi boot bundle available.");
System.setProperty("osgi.bundles", locationsStruct.osgiBootArtifact
.getFile().getCanonicalPath()
+ "@start");
+ }
+
if (!systemProperties.containsKey("slc.osgi.locations"))
System.setProperty("slc.osgi.locations",
locationsStruct.osgiLocations);
+
for (Iterator keys = systemProperties.keySet().iterator(); keys
.hasNext();) {
Object key = keys.next();