X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=maven-argeo-osgi-plugin%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Fmaven%2Fplugins%2Fosgi%2FEquinoxExecMojo.java;h=acf393e769140f57dcd31484f8ed1844a135344f;hb=0973ad91ada11b5d108f8ea63ab609c3d45acb05;hp=d218100ea0769e917a3f17287c8c9a7707d68922;hpb=12aacead9e88bc62a825f76d80a579eface54953;p=gpl%2Fargeo-slc.git diff --git a/maven-argeo-osgi-plugin/src/main/java/org/argeo/slc/maven/plugins/osgi/EquinoxExecMojo.java b/maven-argeo-osgi-plugin/src/main/java/org/argeo/slc/maven/plugins/osgi/EquinoxExecMojo.java index d218100ea..acf393e76 100644 --- a/maven-argeo-osgi-plugin/src/main/java/org/argeo/slc/maven/plugins/osgi/EquinoxExecMojo.java +++ b/maven-argeo-osgi-plugin/src/main/java/org/argeo/slc/maven/plugins/osgi/EquinoxExecMojo.java @@ -134,9 +134,9 @@ public class EquinoxExecMojo extends AbstractOsgiMojo { 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; } @@ -194,8 +194,14 @@ public class EquinoxExecMojo extends AbstractOsgiMojo { 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(); @@ -205,13 +211,18 @@ public class EquinoxExecMojo extends AbstractOsgiMojo { 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();