作为一个孩子,用Ant项目构建一个Maven项目(building a Maven project with Ant project as a child)

编程入门 行业动态 更新时间:2024-10-28 01:18:18
作为一个孩子,用Ant项目构建一个Maven项目(building a Maven project with Ant project as a child)

我正在尝试在Maven中建造一个父母pom,其中包括一个用蚂蚁建造的孩子。 我得到以下例外,

Execution default of goal org.apache.maven.plugins:maven-antrun-plugin:1.6:run failed: A required class was missing while executing org.apache.maven.plugins:maven-antrun-plugin:1.6:run

我的代码是:

<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> <version>1.6</version> <executions> <execution> <phase>compile</phase> <configuration> <target> <ant dir="SampleJava/projectBuilder.xml" /> </target> </configuration> <goals> <goal>run</goal> </goals> </execution> </executions>

am trying to build a parent pom in Maven which includes a child which is built in ant. I am getting the below exception,

Execution default of goal org.apache.maven.plugins:maven-antrun-plugin:1.6:run failed: A required class was missing while executing org.apache.maven.plugins:maven-antrun-plugin:1.6:run

My code is:

<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> <version>1.6</version> <executions> <execution> <phase>compile</phase> <configuration> <target> <ant dir="SampleJava/projectBuilder.xml" /> </target> </configuration> <goals> <goal>run</goal> </goals> </execution> </executions>

最满意答案

and it got resolved with the below code: -------- <plugin> <artifactId>maven-antrun-plugin</artifactId> <executions> <execution> <phase>process-resources</phase> <configuration> <tasks> <ant antfile="../SampleJava/projectBuilder.xml" target="makejar"/> </tasks> </configuration> <goals> <goal>run</goal> </goals> </execution> </executions> </plugin> and it got resolved with the below code: -------- <plugin> <artifactId>maven-antrun-plugin</artifactId> <executions> <execution> <phase>process-resources</phase> <configuration> <tasks> <ant antfile="../SampleJava/projectBuilder.xml" target="makejar"/> </tasks> </configuration> <goals> <goal>run</goal> </goals> </execution> </executions> </plugin>

更多推荐

maven,apache,pom,Maven,电脑培训,计算机培训,IT培训"/> <meta name="descri

本文发布于:2023-08-02 23:01:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1381450.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:项目   作为一个   构建一个   孩子   Ant

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!