Use execDir to choose config and data dir when not forked. svn/tags/maven-plugins-0.3.0@2542
authorMathieu Baudier <mbaudier@argeo.org>
Tue, 9 Jun 2009 16:16:43 +0000 (16:16 +0000)
committerMathieu Baudier <mbaudier@argeo.org>
Tue, 9 Jun 2009 16:16:43 +0000 (16:16 +0000)
git-svn-id: https://svn.argeo.org/slc/trunk/maven@2520 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc

maven-argeo-osgi-plugin/pom.xml
maven-argeo-osgi-plugin/src/main/java/org/argeo/slc/maven/plugins/osgi/EquinoxExecMojo.java

index 4d2f66f1bb73e5c2383f461a1082fbae39967ea8..baebae2ff95e1617cbbe7cab287ad89555654c9e 100644 (file)
@@ -7,7 +7,7 @@
                <relativePath>..</relativePath>\r
        </parent>\r
        <artifactId>maven-argeo-osgi-plugin</artifactId>\r
-       <version>0.1.12</version>\r
+       <version>0.1.13</version>\r
        <packaging>maven-plugin</packaging>\r
        <name>Argeo OSGi Plugin</name>\r
 \r
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();