Re: How can I tell what value of "maxmem" the maven-compiler-plugin is using by default?

2022-04-01 Thread Bernd Eckenfels
If you don’t provide the fork=true parameter then javac will be started inline 
and no heap settings are applicable.

Beside that the debug (-X) output is correctly showing you the expanded values, 
if the property is not expanded it was not specified.

Gruss
Bernd


--
http://bernd.eckenfels.net

Von: KARR, DAVID 
Gesendet: Friday, April 1, 2022 8:02:37 PM
An: Maven Users List 
Betreff: 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?

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



Re: How can I tell what value of "maxmem" the maven-compiler-plugin is using by default?

2022-04-01 Thread Benjamin Marwell
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,  wrote:

> > -Original Message-
> > From: KARR, DAVID 
> > Sent: Friday, April 1, 2022 11:03 AM
> > To: Maven Users List 
> > 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
>
>


RE: How can I tell what value of "maxmem" the maven-compiler-plugin is using by default?

2022-04-01 Thread KARR, DAVID
> -Original Message-
> From: KARR, DAVID 
> Sent: Friday, April 1, 2022 11:03 AM
> To: Maven Users List 
> 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



How can I tell what value of "maxmem" the maven-compiler-plugin is using by default?

2022-04-01 Thread KARR, DAVID
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? 

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