You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Ron Bets <ro...@oracle.com> on 2014/02/18 23:06:29 UTC
OutOfMemory exception when using Maven in ant
Hi there,
I am trying to incorporate Maven dependency management into my ant build as follows:
<artifact:dependencies pathId="my.dependencies.class.path">
<dependency groupId="org.lib"
artifactId="libtools"
version="1.1.1"/>
<dependency groupId=" org.lib "
artifactId="otherlib"
version="1.1.1"/>
<remoteRepository refid="archiva.repository"/>
</artifact:dependencies>
When I do a clean build, i.e. 'ant clean my-target', I get the following exception:
java.lang.OutOfMemoryError: PermGen space
Can someone help explain what is going on here and how I might mitigate this problem? Once I have this working for the first classpath, I plan to change all my classpaths to use the repository, but this looks like a bit of a show-stopper.
Thanks in advance,
Ron
Re: OutOfMemory exception when using Maven in ant
Posted by Ron Wheeler <rw...@artifact-software.com>.
This looks like an ant problem.
You could try to increase the memory defaults in your Java VM.
Make them really big and then pare them down if you feel the need to be
precise (No value in that technically).
Ron
On 18/02/2014 5:06 PM, Ron Bets wrote:
> Hi there,
>
>
>
> I am trying to incorporate Maven dependency management into my ant build as follows:
>
>
>
> <artifact:dependencies pathId="my.dependencies.class.path">
>
> <dependency groupId="org.lib"
>
> artifactId="libtools"
>
> version="1.1.1"/>
>
> <dependency groupId=" org.lib "
>
> artifactId="otherlib"
>
> version="1.1.1"/>
>
> <remoteRepository refid="archiva.repository"/>
>
> </artifact:dependencies>
>
>
>
> When I do a clean build, i.e. 'ant clean my-target', I get the following exception:
>
> java.lang.OutOfMemoryError: PermGen space
>
>
>
> Can someone help explain what is going on here and how I might mitigate this problem? Once I have this working for the first classpath, I plan to change all my classpaths to use the repository, but this looks like a bit of a show-stopper.
>
>
>
> Thanks in advance,
>
> Ron
>
--
Ron Wheeler
President
Artifact Software Inc
email: rwheeler@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: OutOfMemory exception when using Maven in ant
Posted by Barrie Treloar <ba...@gmail.com>.
> I am trying to incorporate Maven dependency management into my ant build as follows:
[del]
> java.lang.OutOfMemoryError: PermGen space
>
This is a Java problem rather than a Maven or Ant one.
It has to do with not enough memory to load all the classes into the
PermGen space.
You can read up about PermGen space to get more of an idea as well
* http://www.oracle.com/technetwork/java/javase/memleaks-137499.html#gbyuu
* http://java.dzone.com/articles/busting-permgen-myths
See http://stackoverflow.com/questions/88235/dealing-with-java-lang-outofmemoryerror-permgen-space-error
for some solutions.
It talks about Tomcat, but the problem occurs in command line Java.
As a workaround use (or large values than 128M if needed)
-XX:MaxPermSize=128M
Also look at similar XX options at
http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org