You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2022/01/11 07:29:02 UTC

[GitHub] [maven-mvnd] gnodet commented on pull request #577: Set default max heap size to null

gnodet commented on pull request #577:
URL: https://github.com/apache/maven-mvnd/pull/577#issuecomment-1009667746


   > Let the JVM decide the max heap size instead of using hardcoded defaults to match the behaviour of vanilla Maven.
   > 
   > Fixes #560
   > 
   > I tried adding a test like:
   > 
   > ```java
   > Client client = ClientFactory.create(parameters.withJdkJavaOpts("-Xmx200M -XshowSettings"));
   > final TestClientOutput output = new TestClientOutput();
   > client.execute(output, "verify").assertSuccess();
   > output.assertContainsMatchingSubsequence("Max. Heap Size: 200.00M");
   > ```
   > 
   > But it fails. It seems the TestClientOutput only contains messages from Maven itself - not the JVM.
   > 
   > Should I try to add a test that verifies that explicitly passing `mvnd.maxHeapSize` is respected and that explicitly passing `-Xmx` works (instead of getting overwritten by `mvnd.maxHeapSize`).
   
   You should be able to get the JVM args by launching the following command inside the test:
   ```
   mvnd org.codehaus.gmaven:groovy-maven-plugin:2.1.1:execute -Dsource="println java.lang.management.ManagementFactory.getRuntimeMXBean().getInputArguments()"
   ```
   and check that the `-Xmx` string does not appear, or appear with the correct number.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org