Apache Maven项目提供的AntRun插件详解
来源:互联网 发布:几何网络是什么意思 编辑:程序博客网 时间:2024/06/07 03:11
AntRun插件是为了便于从Ant项目迁移到Maven而设计的,提供了在Maven中运行Ant target的能力。当前最新版本是2014.12发布的1.8。
甚至,可以将Ant脚本直接嵌入到POM中执行。当然,并不建议将Ant脚本嵌入到POM中执行,而是采用在POM中调用<ant/>target方式。
AntRun插件的基本信息:
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <version>1.8</version>
<groupId>org.apache.maven.plugins</groupId><artifactId>maven-antrun-plugin</artifactId><version>1.8</version>
AntRun插件只有一个goal:
- antrun:run,在Maven中运行Ant target
AntRun插件在POM中的基本配置:
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <version>1.8</version>
- <executions>
- <execution>
- <phase> <!– a lifecycle phase –> </phase>
- <configuration>
- <target>
- <!–
- Place any Ant task here. You can add anything
- you can add between <target> and </target> in a
- build.xml.
- –>
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- …
- </execution>
- …
- </executions>
- </plugin>
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> <version>1.8</version> <executions> <execution> <phase> <!-- a lifecycle phase --> </phase> <configuration> <target> <!-- Place any Ant task here. You can add anything you can add between <target> and </target> in a build.xml. --> </target> </configuration> <goals> <goal>run</goal> </goals> </execution> <execution> … </execution> … </executions> </plugin>
参考文献:
http://maven.apache.org/plugins/maven-antrun-plugin/
阅读全文
0 0
- Apache Maven项目提供的AntRun插件详解
- Apache Maven项目提供的AntRun插件详解
- Apache Maven项目提供的Archetype插件详解
- Apache Maven项目提供的Compiler插件详解
- Apache Maven项目提供的Ant插件详解
- Apache Maven项目提供的EJB插件详解
- Apache Maven项目提供的JAR插件详解
- Apache Maven项目提供的WAR插件详解
- Apache Maven项目提供的EAR插件详解
- Apache Maven项目提供的Surefire插件详解
- Apache Maven项目提供的Dependency插件详解
- Apache Maven项目提供的Archetype插件详解
- Apache Maven项目提供的Compiler插件详解
- Apache Maven项目提供的Ant插件详解
- Apache Maven项目提供的EJB插件详解
- Apache Maven项目提供的JAR插件详解
- Apache Maven项目提供的WAR插件详解
- Apache Maven项目提供的EAR插件详解
- DeepLearning(基于caffe)实战项目(7)--从caffe结构里函数总结一览caffe
- [一天几个linux命令] 命令执行的决断依据 ; && ||
- MacOS 开发入门
- 很好的,机器学习资料
- jquery each函数 break和continue功能
- Apache Maven项目提供的AntRun插件详解
- Vue模拟数据,实现路由进入商品详情页面
- Copy List with Random Pointer(two pointers)
- freemarker里取map的key和value
- Maven项目Spring+Mybatis框架中实现各种发邮件的形式
- Spring--IoC--域属性的注入-使用@Resource注解(JSR)
- mybatis 二级缓存配置
- Java中日期格式转换
- 100000人同时访问系统,tomcat为什么会挂掉?tomcat挂掉的表现是什么?