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?