You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Mark Derricutt <ma...@talios.com> on 2012/12/05 22:05:28 UTC

maven-exec-plugin and VM args

Hey all,

Seeing some odd behaviour with maven-exec-plugin and JVM arguments that 
seem to be eluding me. I have the following config:

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<configuration>
<executable>java</executable>
<classpathScope>test</classpathScope>
<longClasspath>true</longClasspath>
<arguments>
<argument>-Dcom.sun.management.jmxremote -Djava.awt.headless=true -Xmx1024m
                                     -XX:MaxPermSize=256m 
-XX:+HeapDumpOnOutOfMemoryError
</argument>
<argument>-Xdebug 
-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005
</argument>
                                 ........
</configuration>
<executions>
<execution>
<id>integration-tests</id>
<phase>test</phase>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>

and yet when I run the plugin, I see all the arguments being passed to 
the command line of the process, but the process never seems to setup 
the debug options, or suspend the server till I connect, or update the 
permgen.

Looking at the output of ps on my Mac everything looks like it should be 
ok....   am I missing something blindingly obvious?

Cheers
Mark


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: maven-exec-plugin and VM args

Posted by Mark Derricutt <ma...@talios.com>.
Anders,

Mmm that sounds plausible altho so far I don't seem to see any 
difference in behaviour, my "ps aux" output shows

amrk 6040 0.0 5.7 4054184 478464 s000 S+ 10:53am 3:57.72 /usr/bin/java 
-Dcom.sun.management.jmxremote -Djava.awt.headless=true -Xmx1024m 
-XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled 
-XX:MaxPermSize=256m -XX:+HeapDumpOnOutOfMemoryError -Xdebug 
-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005 
-Dconcordion.output.dir=target/concordion 
-Dsmx3.config.dir=/Users/amrk/IdeaProjects/securemx/smx3/smx3-integration/integration/../../config 
-Dsmx3.database.host=localhost -Dsmx3.database.name=smx3 
-Dintermail.enabled=true -Dintermail.password=xxxx 
-Dintermail.url=ldap://localhost:1024 
-Dintermail.user=uid=admin,ou=system -jar 
/var/folders/vx/7v3qnlc53lgbm19_nn0g59_r0000gn/T/maven-exec36536174902264218.jar

which all looks like it should be starting a debug session and 
suspending. hrm.

Anders Hammar wrote:
>
> I think I ran into something similar the other day. You need to put 
> each of
> the arguments in a separate argument element.
>
> <argument>-Dcom.sun.management.jmxremote</argument>
> <argument>-Djava.awt.headless=true</argument>
> <argument>-Xmx1024m</argument>


Re: maven-exec-plugin and VM args

Posted by Anders Hammar <an...@hammar.net>.
I think I ran into something similar the other day. You need to put each of
the arguments in a separate argument element.

<argument>-Dcom.sun.management.jmxremote</argument>
<argument>-Djava.awt.headless=true</argument>
<argument>-Xmx1024m</argument>
etc.

/Anders



On Wed, Dec 5, 2012 at 10:05 PM, Mark Derricutt <ma...@talios.com> wrote:

> Hey all,
>
> Seeing some odd behaviour with maven-exec-plugin and JVM arguments that
> seem to be eluding me. I have the following config:
>
> <plugin>
> <groupId>org.codehaus.mojo</**groupId>
> <artifactId>exec-maven-plugin<**/artifactId>
> <version>1.2.1</version>
> <configuration>
> <executable>java</executable>
> <classpathScope>test</**classpathScope>
> <longClasspath>true</**longClasspath>
> <arguments>
> <argument>-Dcom.sun.**management.jmxremote -Djava.awt.headless=true
> -Xmx1024m
>                                     -XX:MaxPermSize=256m -XX:+**
> HeapDumpOnOutOfMemoryError
> </argument>
> <argument>-Xdebug -Xrunjdwp:transport=dt_socket,**
> server=y,suspend=y,address=**5005
> </argument>
>                                 ........
> </configuration>
> <executions>
> <execution>
> <id>integration-tests</id>
> <phase>test</phase>
> <goals>
> <goal>exec</goal>
> </goals>
> </execution>
> </executions>
>
> and yet when I run the plugin, I see all the arguments being passed to the
> command line of the process, but the process never seems to setup the debug
> options, or suspend the server till I connect, or update the permgen.
>
> Looking at the output of ps on my Mac everything looks like it should be
> ok....   am I missing something blindingly obvious?
>
> Cheers
> Mark
>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: users-unsubscribe@maven.**apache.org<us...@maven.apache.org>
> For additional commands, e-mail: users-help@maven.apache.org
>
>