我有一个由Maven AntRun调用的自定义ant任务,但由于它有很多已定义的执行,因此类加载器似乎正在加载很多并抛出OutOfMemory - PermGen空间。如何更好地定义将类导入此自定义ant任务的位置?
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>
编辑:我已经查到了https://maven.apache.org/plugins/maven-antrun-plugin/examples/customTasks.html但这个文件夹确实包含了大约50个以上的jar ...有没有办法定义它们而不是像这样声明每一个? Can I add jars to maven 2 build classpath without installing them?