It's all about the answers!

Ask a question

Classpath definition in Maven Antrun


Diogo Mildenberger (538) | asked Mar 21 '14, 9:45 a.m.
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



permanent link
Patrick Fink (111) | answered Jul 30 '15, 11:20 a.m.
edited Jul 30 '15, 12:20 p.m.
 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...

Comments
Diogo Mildenberger commented Jul 31 '15, 2:24 p.m.

Not at all... Due to other concerns, I gave up on this one, and just report that Maven is running, not the individual steps. It's definitely a "nice to have", but I hope someday I can report RTC status mid-execution 

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.