You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Benjamin Bentmann <be...@udo.edu> on 2009/07/07 18:25:06 UTC

Re: svn commit: r791464 - in /maven/plugins/trunk/maven-javadoc-plugin/src: main/java/org/apache/maven/plugin/javadoc/AbstractFixJavadocMojo.java test/java/org/apache/maven/plugin/javadoc/FixJavadocMojoTest.java

Hi Vincent,

> Author: vsiveton
> Date: Mon Jul  6 12:38:12 2009
> New Revision: 791464
> 
> URL: http://svn.apache.org/viewvc?rev=791464&view=rev
> Log:
> o added MavenOpts for the invoker
> 
> 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?


Benjamin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: svn commit: r791464 - in /maven/plugins/trunk/maven-javadoc-plugin/src: main/java/org/apache/maven/plugin/javadoc/AbstractFixJavadocMojo.java test/java/org/apache/maven/plugin/javadoc/FixJavadocMojoTest.java

Posted by Brett Porter <br...@apache.org>.
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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: svn commit: r791464 - in /maven/plugins/trunk/maven-javadoc-plugin/src: main/java/org/apache/maven/plugin/javadoc/AbstractFixJavadocMojo.java test/java/org/apache/maven/plugin/javadoc/FixJavadocMojoTest.java

Posted by Vincent Siveton <vi...@gmail.com>.
Hi Benjamin,

2009/7/7, Benjamin Bentmann <be...@udo.edu>:
>  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

Well, I was not aware of this default behaviour...but I think it is
enough from an user point of view.

> expect this setting to be at least configurable. Or do I miss an existing
> way for a user to adjust this setting?

If user get init error of VM, he should adjust its MAVEN_OPTS.

Thanks!

Vincent

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org