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 shows an example of using Maven Antrun to inform RTC of build progress:

               <taskdef name="startBuildActivity" classname="">
                     <fileset dir="C:\jazz\buildsystem\buildtoolkit">
                        <include name="*.jar" />

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
   [INFO] Executed tasks
   [INFO] --- maven-antrun-plugin:1.7:run (rtc-compile-activity) @ cadam-rtc-build ---
   [INFO] Executing tasks
   [ERROR] PermGen space -> [Help 1]
   [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] For more information about the errors and possible solutions, please read the following articles:
   [ERROR] [Help 1]

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...

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.