On 08/07/2009, at 2:25 AM, Benjamin Bentmann wrote:

Modified:
maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/ apache/maven/plugin/javadoc/AbstractFixJavadocMojo.java maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/ apache/maven/plugin/javadoc/FixJavadocMojoTest.java Modified: maven/plugins/trunk/maven-javadoc-plugin/src/main/java/ org/apache/maven/plugin/javadoc/AbstractFixJavadocMojo.java
URL: 
http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/AbstractFixJavadocMojo.java?rev=791464&r1=791463&r2=791464&view=diff
= = = = = = = = = ===================================================================== --- maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/ apache/maven/plugin/javadoc/AbstractFixJavadocMojo.java (original) +++ maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/ apache/maven/plugin/javadoc/AbstractFixJavadocMojo.java Mon Jul 6 12:38:12 2009
@@ -665,6 +665,8 @@
InvocationOutputHandler outputHandler = new PrintStreamHandler( ps, false );
        request.setOutputHandler( outputHandler );
        request.setDebug( true );
+        request.setMavenOpts( "-Xms256m -Xmx256m" );
+
        String clirrGoal = getFullClirrGoal();
        request.setGoals( Collections.singletonList( clirrGoal ) );


This looks dangerous: What if my project requires more memory to run Clirr? Then I would be stuck. There might also be other stuff that a user has configured for MAVEN_OPTS and expects to be effective.

Why not simply pass the MAVEN_OPTS from the current process through to the forked one (this should be the default behavior IIRC)? Otherwise I would expect this setting to be at least configurable. Or do I miss an existing way for a user to adjust this setting?

Agreed, actually mimicking the behaviour of the compiler plugin here which has the same thing might be a good idea. This sort of thing should be worked into a toolchain eventually so best to keep them lined up.

Unless this is really required every time I think I'd prefer a warning that says memory looks low and how to configure it rather than forcing that on a user.

- Brett


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to