1
我目前有一个Maven构建,它调用一个ant任务来运行。这个ant任务依赖于一些外部库。这些库目前在我的系统中进行了硬编码。我想将这些外部库移动到本地Maven库,并让maven从回购库中检索它们,但不知道如何执行此操作。如何在ant maven任务中使用外部lib /依赖项?
我现在的任务定义为(编辑为简洁的全任务定义):
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<!-- Ant Custom Folder copying plugin -->
<execution>
<id>rename_files</id>
<phase>process-resources</phase>
<configuration>
<tasks>
<taskdef resource="net/sf/antcontrib/antlib.xml" classpath="${env.ANT_HOME}/lib/ant-contrib-1.0b3.jar" />
<taskdef name="stringutil" classname="ise.antelope.tasks.StringUtilTask" classpath="${env.ANT_HOME}/lib/AntelopeTasks_3.4.1.jar" />
<typedef name="trim" classname="ise.antelope.tasks.typedefs.string.Trim" classpath="${env.ANT_HOME}/lib/AntelopeTasks_3.4.1.jar" />
<typedef name="lastindexof" classname="ise.antelope.tasks.typedefs.string.LastIndexOf" classpath="${env.ANT_HOME}/lib/AntelopeTasks_3.4.1.jar" />
<typedef name="substring" classname="ise.antelope.tasks.typedefs.string.Substring" classpath="${env.ANT_HOME}/lib/AntelopeTasks_3.4.1.jar" />
<typedef name="listfiles" classname="ise.antelope.tasks.typedefs.file.FileList" classpath="${env.ANT_HOME}/lib/AntelopeTasks_3.4.1.jar" />
<taskdef name="fileutil" classname="ise.antelope.tasks.FileUtilTask" classpath="${env.ANT_HOME}/lib/AntelopeTasks_3.4.1.jar" />
<!-- CSS -->
<for param="file">
<path>
<fileset dir="target\Com-${project.version}\style\" includes="*.css" />
</path>
<sequential>
<fileutil file="@{file}" property="fileWithoutPath">
<listfiles includepath="false" />
</fileutil>
</sequential>
</for>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
我知道我可以定义<dependencies>
为我的插件的一部分闪避,但不知道如何重新定义我的taskdef
点到依赖与rar jar文件。