Maven Ant Generator

2018-01-09 19:18 更新

Maven教程 - Maven Ant Generator


为我们的Maven项目生成Ant构建文件(build.xml)为了集成目的,我们可以使用Maven Ant插件。

找到您的pom.xml文件,并发出命令: mvn ant:ant

c:\mvn_test\xmlFileEditor>mvn ant:ant

上述命令生成以下结果。

c:\mvn_test\xmlFileEditor>mvn ant:ant
[INFO] Scanning for projects...
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-ant-plugin/maven-metadata.xml
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-ant-plugin/maven-metadata.xml (464 B at 0.4 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-ant-plugin/2.3/maven-ant-plugin-2.3.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-ant-plugin/2.3/maven-ant-plugin-2.3.pom (6 KB at 43.7 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-ant-plugin/2.3/maven-ant-plugin-2.3.jar
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-ant-plugin/2.3/maven-ant-plugin-2.3.jar (39 KB at 120.2 KB/sec)
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building xmlFileEditor 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-ant-plugin:2.3:ant (default-cli) @ xmlFileEditor ---
Downloading: https://repo.maven.apache.org/maven2/org/apache/ant/ant/1.7.1/ant-1.7.1.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/ant/ant/1.7.1/ant-1.7.1.pom (10 KB at 55.7 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/ant/ant-parent/1.7.1/ant-parent-1.7.1.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/ant/ant-parent/1.7.1/ant-parent-1.7.1.pom (5 KB at 31.4 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/ant/ant-launcher/1.7.1/ant-launcher-1.7.1.pom
Downloaded: https://repo.maven.apache.org/maven2/org/apache/ant/ant-launcher/1.7.1/ant-launcher-1.7.1.pom (3 KB at 13.7 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/xalan/xalan/2.7.0/xalan-2.7.0.pom
Downloaded: https://repo.maven.apache.org/maven2/xalan/xalan/2.7.0/xalan-2.7.0.pom (491 B at 3.5 KB/sec)
Downloading: https://repo.maven.apache.org/maven2/org/apache/ant/ant/1.7.1/ant-1.7.1.jar
Downloading: https://repo.maven.apache.org/maven2/xalan/xalan/2.7.0/xalan-2.7.0.jar
Downloading: https://repo.maven.apache.org/maven2/org/apache/ant/ant-launcher/1.7.1/ant-launcher-1.7.1.jar
Downloaded: https://repo.maven.apache.org/maven2/org/apache/ant/ant-launcher/1.7.1/ant-launcher-1.7.1.jar (12 KB at 33.2 KB/sec)
Downloaded: https://repo.maven.apache.org/maven2/org/apache/ant/ant/1.7.1/ant-1.7.1.jar (1292 KB at 1069.5 KB/sec)
Downloaded: https://repo.maven.apache.org/maven2/xalan/xalan/2.7.0/xalan-2.7.0.jar (2667 KB at 1169.5 KB/sec)
[INFO] Wrote Ant project for xmlFileEditor to c:\mvn_test\xmlFileEditor
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.287 s
[INFO] Finished at: 2014-11-22T20:21:11-08:00
[INFO] Final Memory: 21M/369M
[INFO] ------------------------------------------------------------------------
c:\mvn_test\xmlFileEditor>


以上内容是否对您有帮助:
在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号