Use execDir to choose config and data dir when not forked.
[gpl/argeo-slc.git] / maven-argeo-osgi-plugin / src / main / java / org / argeo / slc / maven / plugins / osgi / EquinoxExecMojo.java
index 1289b55861bffd7f316756582c7db329d0ea3c0c..acf393e769140f57dcd31484f8ed1844a135344f 100644 (file)
@@ -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();