The maven-javadoc-plugin has a maxmemory configuration parameter. In my parent
POM I set a default property docs.maxMemory and then configure
maven-javadoc-plugin with
<maxmemory>${docs.maxMemory}</maxmemory>
So each team can override that default setting in their pom.xml if they have an
unusually large codebase, or set it really high on the command line for an
aggregate javadoc of the entire multi-project workspace.
-----Original Message-----
From: Martin Hoeller [mailto:[email protected]]
Sent: Friday, March 28, 2014 8:39 AM
To: Baptiste Mathus
Cc: Maven Users List
Subject: Re: OutOfMemoryError with maven-javadoc-plugin
Yes I did. If I tried without "-J" I got some error.
On 28 Mär 2014, Baptiste Mathus wrote:
> Did you make sure you put -J-Xmx and not only -Xmx ?
>
>
> 2014-03-28 12:24 GMT+01:00 Martin Hoeller <[email protected]>:
>
> > Hi Baptiste!
> >
> > I tried it but it didn't change anything. Still OutOfMemoryError :(
> >
> > -martin
> >
> > On 28 Mär 2014, Baptiste Mathus wrote:
> >
> > > Sorry, I haven't used javadoc for years now, but as javadoc is an
> > external
> > > tool, I guess you should specify additionalJOption?
> > >
> > http://maven.apache.org/plugins/maven-javadoc-plugin/javadoc-mojo.ht
> > ml#additionalJOption
> > >
> > > Cheers
> > >
> > >
> > > 2014-03-28 10:36 GMT+01:00 Martin Hoeller <[email protected]>:
> > >
> > > > Hi!
> > > >
> > > > I have a quite large multimodule project with >150 modules. When
> > > > executing "mvn site" the maven-javadoc-plugin is executed with
> > > > default configuration. After some time of execution it fails in
> > > > "aggregate"
> > goal
> > > > and I get a
> > > >
> > > > Exception in thread "main" java.lang.OutOfMemoryError: GC
> > > > overhead
> > limit
> > > > exceeded"
> > > >
> > > > I know, I can adjust MAVEN_OPTS to give it more memory and I
> > > > tried it
> > with
> > > > MAVEN_OPTS="-Xmx1536m -Xms512m -XX:MaxPermSize=512m" and with
> > > > MAVEN_OPTS="-Xmx1280m -Xms256m -XX:MaxPermSize=768m". Both just
> > > > leading to another OutOfMemoryError (but no GC overhead limit exceeded).
> > > >
> > > > I'm currently using maven 3.1.1 and tested with m-javadoc-p 2.8
> > > > and
> > 2.9.1
> > > > (no difference).
> > > >
> > > > So my question is: does any body have some idea how to tweak
> > > > parameters to solve this issue?
> > > >
> > > > My current workaround is to disable aggregation in <reporting>
> > > > section
> > as
> > > > described here [0]. But this is really just a workaround, no
> > > > solution
> > :(
> > > >
> > > > thx for your help,
> > > > - martin
> > > >
> > > > [0]
> > > >
> > https://maven.apache.org/plugins/maven-javadoc-plugin/examples/selec
> > tive-javadocs-report.html
> > > >
> > >
> > >
> > >
> > > --
> > > Baptiste <Batmat> MATHUS - http://batmat.net Sauvez un arbre,
> > > Mangez un castor !
> >
> >
> > --
> > Martin Höller | [email protected]
> > *x Software + Systeme | http://www.xss.co.at/
> > Karmarschgasse 51/2/20 | Tel: +43-1-6060114-40
> > A-1100 Vienna, Austria | Fax: +43-1-6060114-71
> >
>
>
>
> --
> Baptiste <Batmat> MATHUS - http://batmat.net Sauvez un arbre, Mangez
> un castor !
--
Martin Höller | [email protected]
*x Software + Systeme | http://www.xss.co.at/
Karmarschgasse 51/2/20 | Tel: +43-1-6060114-40
A-1100 Vienna, Austria | Fax: +43-1-6060114-71
----------------------------------------------------------------------
This e-mail, including any attached files, may contain confidential and
privileged information for the sole use of the intended recipient. Any review,
use, distribution, or disclosure by others is strictly prohibited. If you are
not the intended recipient (or authorized to receive information for the
intended recipient), please contact the sender by reply e-mail and delete all
copies of this message.