我是新手。我的项目要求如下:
我有一个 build.xml 文件,它将合并 N 个文件以在目标文件夹中创建一个文件。-- 使用 ant build 运行时,它工作得非常好。
现在我必须将此 build.xml 文件与 pom.xml 文件集成,这样当我运行 mvn deploy / install 时,它也会运行 build.xml 文件以生成合并的单个文件。
现在我尝试使用 maven-antrun-plugin,但它不起作用。你能帮帮我吗?
如果您需要我提供任何详细信息,请告诉我。
谢谢,
您是否尝试使用以下配置?:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<phase>process-resources</phase>
<configuration>
<target name="runbuild">
<ant antfile="path/to/build.xml"/>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>