set MAVEN_OPTS = -Xmx512m for example. It can't be done directly from the cli.
On Thu, May 7, 2009 at 1:39 AM, shrimpywu <[email protected]> wrote: > > Before i run my program like this > > <plugin> > <groupId>org.codehaus.mojo</groupId> > <artifactId>exec-maven-plugin</artifactId> > <executions> > <execution> > <goals> > <goal>exec</goal> > </goals> > </execution> > </executions> > < > <configuration> > <executable>java</executable> > <arguments> > <argument>-Xms32m</argument> > <argument>-Xmx1024m</argument> > <argument>-classpath</argument> > <classpath /> > <argument>org.myproject.Main</argument> > </arguments> > </configuration> > > </plugin> > > however i have to pass arguments in run time, > so i have to do things like this > mvn exec:java -Dexec.mainClass="org.myproject.Main" > -Dexec.args="argument1" > > but i found out that, if i do in comand line, i can specify any argument in > the POM any more, > coz it will complain and throws exception. > but i do want to increase the java heap size, otherwise i will get "Out of > memory" exception > > So...can any one help me how can i do both??? > -- > View this message in context: > http://www.nabble.com/hi%2C-how-to-specify-java_opts-in-maven-tp23420573p23420573.html > Sent from the Maven - Users mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
