0

I have a custom ant task being called by Maven AntRun, but since it has a lot of defined executions, the classloader seems to be loading up a lot and throwing OutOfMemory - PermGen space. How can I better define where to import the classes to this custom ant task?

pom:

     <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-antrun-plugin</artifactId>
        <version>1.7</version>
        <configuration>
           <target>
              <taskdef name="startBuildActivity" classname="com.ibm.team.build.ant.task.StartBuildActivityTask">
                 <classpath>
                    <fileset dir="K:\Build\RTC-BuildSystem-Toolkit-Win-4.0.4\jazz\buildsystem\buildtoolkit">
                       <include name="*.jar" />
                    </fileset>
                 </classpath>
              </taskdef>
              <startBuildActivity repositoryAddress="${repositoryAddress}" userId="build" password="build" buildResultUUID="${buildResultUUID}" autoComplete="true" label="Maven - ${executionId} phase" />
           </target>
        </configuration>
        <executions>
           ...lots of executions...
        </executions>
     </plugin>

EDIT: I have looked up to https://maven.apache.org/plugins/maven-antrun-plugin/examples/customTasks.html but this folder does contain some 50+ jars... Is there a way to define them other than declaring every single one like this? Can I add jars to maven 2 build classpath without installing them?

Community
  • 1
  • 1
Diogo
  • 115
  • 7
  • You don't seem to be forking a new process, so antrun is in the same process as the rest of Maven. If you need to increase the PermGen space set an variable in the OS: `MAVEN_OPTS=-XX:MaxPermSize=256m` – Richard Holt Mar 12 '14 at 19:37
  • Might be an option, what is the best way to fork it? – Diogo Mar 21 '14 at 14:16

0 Answers0