[ http://jira.codehaus.org/browse/MEXEC-16?page=comments#action_85453 ]
Jerome Lacoste commented on MEXEC-16:
-------------------------------------
The documentation states:
Note: the java goal doesn't spawn a new process. Any VM specific option that
you want to pass to the executed class must be passed to the mav
en VM using
the MAVEN_OPTS environment variable.
E.g.
MAVEN_OPTS=-Xmx1024m
com.sun.management.jmxremote is I think such an option. I should perhaps make
the doc clearer.
> Setting -Dcom.sun.management.jmxremote system property is not propagated into
> the app called by exec:java
> ---------------------------------------------------------------------------------------------------------
>
> Key: MEXEC-16
> URL: http://jira.codehaus.org/browse/MEXEC-16
> Project: Mojo Exec Plugin
> Issue Type: Bug
> Affects Versions: 1.1
> Environment: Java 1.5, latest snapshot of exec-maven plugin
> (1.1-20061226.142631-2)
> Reporter: toli kuznets
> Priority: Minor
>
> I have an app that registers a JMX bean.
> I have the POM setup to set the -Dcom.sun.management.jmxremote system
> property:
> <plugins>
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>exec-maven-plugin</artifactId>
> <configuration>
>
> <mainClass>org.marketcetera.oms.OrderManagementSystem</mainClass>
> <arguments>
> <argument>oms</argument>
> </arguments>
> <systemProperties>
>
> <systemProperty><key>com.sun.management.jmxremote</key></systemProperty>
> </systemProperties>
> </configuration>
> </plugin>
> However, when i run the app from command line, i don't see anything when
> running the jconsole app.
> If i run the same app from an IDE (intellij) that has the
> -Dcom.sun.management.jmxremote set or if i run it from a shell script then i
> can seem my MBean in jconsole.
> It's possible that i'm not setting up exec-maven plugin correctly but i tried
> different combos and it all fails.
> The system property itself is set (i test it with
> System.getProperty("com.sun.management.jmxremote") which is non-null, so
> perhaps there's another problem somewhere.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email