Yes, it's using the javac compilers default.
It may differ depending on the JVM. OpenJ9, for example, will use up to 25%
of your memory by default. Others may use something between 64M and 512M.

Be aware that maxmem will only work if fork is set to true:
https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#maxmem

Otherwise (no forking) compiling is done in the same process as Maven is
running in. You can then use -Xmx (eg in the .mvn config) as usual.


 Ben

On Fri, 1 Apr 2022, 20:10 KARR, DAVID, <dk0...@att.com> wrote:

> > -----Original Message-----
> > From: KARR, DAVID <dk0...@att.com>
> > Sent: Friday, April 1, 2022 11:03 AM
> > To: Maven Users List <users@maven.apache.org>
> > Subject: How can I tell what value of "maxmem" the maven-compiler-plugin
> > is using by default?
> >
> > I noticed that we have one build that is trying to compile so many files
> > that it is running out of memory in the maven-compiler-plugin execution.
> > I see that I can set the "maxmem" property in that plugin's
> > configuration.  What would be nice to know is what the default value is.
> > I thought that perhaps "mvn -X" would tell me that, but that only tells
> > me that the default value is "${maven.compiler.maxmem}".  That doesn't
> > help me.  How can I get the default value of this property, or any
> > particular property, from a given pom?
>
> Self-answering, I guess if this is simply not providing a value if none is
> provided, that would leave it to the default maxmem for the jvm, which I
> guess is 256mb.  Is that what is happening here?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>

Reply via email to