And the surefire plugin support this:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
<configuration>
<forkMode>once</forkMode>
<argLine>-Xmx1024m -XX:MaxPermSize=128M</argLine>
</configuration>
</plugin>
But I don't think you can for maven itself. I too, at times, wished there
was a way because otherwise we have to set the maven opts to the worse case
for all our poms.
-Dave
On Wed, Oct 7, 2009 at 10:19 AM, Todd Thiessen <[email protected]> wrote:
> I believe the compiler plugin does what you want.
>
>
> http://maven.apache.org/plugins/maven-compiler-plugin/examples/compile-with-memory-enhancements.html
>
> ---
> Todd Thiessen
>
>
> > -----Original Message-----
> > From: NGUYEN Cong Kinh [mailto:[email protected]]
> > Sent: Wednesday, October 07, 2009 12:07 PM
> > To: Maven Users List
> > Subject: Re: [Maven's memory] How to avoid adding the
> > MAVEN_OPTS variable?
> >
> > Hello Paul,
> >
> > In fact, I don't want to set this. My question is that how to
> > directly do this in my POM?
> >
> > Kinh
> >
> > Paul Benedict a écrit :
> > > You could set it in your mvn.bat, right?
> > >
> > > On Wed, Oct 7, 2009 at 10:14 AM, NGUYEN Cong Kinh
> > > <[email protected]> wrote:
> > >
> > >> Hello everybody,
> > >>
> > >> Is there anyway to configure MAVEN_OPTS from the POM file (no
> > >> variable)? For example, I want to configure Maven's memory
> > is 768m.
> > >> But I don't want to add the MAVEN_OPTS variable in the
> > environment.
> > >> This is possible to configure my POM? If yes, please send
> > to me how to do this.
> > >>
> > >> Thanks in advance,
> > >> Kinh
> > >>
> > >>
> > ---------------------------------------------------------------------
> > >> To unsubscribe, e-mail: [email protected]
> > >> For additional commands, e-mail: [email protected]
> > >>
> > >>
> > >>
> > >
> > >
> > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [email protected]
> > > For additional commands, e-mail: [email protected]
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [email protected]
> > For additional commands, e-mail: [email protected]
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>