Classpath definition in Maven Antrun
![](http://jazz.net/_images/myphoto/4371c89dcb0cd133f21f253f15459f33.jpg)
The tutorial presented in https://jazz.net/wiki/bin/view/Main/MavenBuild shows an example of using Maven Antrun to inform RTC of build progress:
...
<taskdef name="startBuildActivity" classname="com.ibm.team.build.ant.task.StartBuildActivityTask">
<classpath>
<fileset dir="C:\jazz\buildsystem\buildtoolkit">
<include name="*.jar" />
</fileset>
</classpath>
</taskdef>
...
Using this example, in 3 or so executions of maven-antrun-plugin, I get this:
[INFO] --- maven-antrun-plugin:1.7:run (rtc-process-resources-activity) @ cadam-rtc-build ---
[INFO] Executing tasks
main:
[INFO] Executed tasks
[INFO]
[INFO] --- maven-antrun-plugin:1.7:run (rtc-compile-activity) @ cadam-rtc-build ---
[INFO] Executing tasks
main:
[ERROR] PermGen space -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/OutOfMemoryError
I am not sure what is causing this issue, but I notice an unusually high consumption of memory by Maven's Java process before crash (~1GB for a demo "Hello World" example). Maybe something related to the way the ant task jars are declared? Any suggestions how can I fix this and reduce memory usage?
One answer
![](http://jazz.net/_images/myphoto/4371c89dcb0cd133f21f253f15459f33.jpg)
Did you find a solution for this problem? I have exactly the same one...
I also saw your question at StackOverflow. Of course, we can increase PermGen space by setting MAVEN_OPTS=-XX:MaxPermSize=256m (or even more), but as the number of antrun executions can reach 20 or more in a real-world project, this workaround is very weak...