我创建了一个Maven Ant插件,它根据指南将大量Ant宏捆绑在一起
http://books.sonatype.com/mcookbook/reference/ch04s04.html http://books.sonatype.com/mvnref-book/reference/writing-plugins-sect-custom-plugin.html#ex-maven-metadata
我有插件的工作和使用Ant控制,虽然我有一个问题,它的使用
Ant 1.7而不是1.8,这意味着的包含语句失败了
[ERROR] Failed to execute goal com.openbet.shared:openbet-shared_ant:2.4-SNAPSHOT:options (default-cli) on project openbet-office: Failed to execute: Executing Ant script: ci.build.xml [run]: Failed to parse. Problem: failed to create task or type include
[ERROR] Cause: The name is undefined.
[ERROR] Action: Check the spelling.
[ERROR] Action: Check that any custom tasks/types have been declared.
[ERROR] Action: Check that any <presetdef>/<macrodef> declarations have taken place.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.我设法使用回波属性来验证它的1.7
[echoproperties] java.runtime.name=Java(TM) SE Runtime Environment
[echoproperties] ant.file.ci.plugin=/tmp/plexus-ant-component586072324287432616.build.xml
[echoproperties] sun.boot.library.path=/usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/amd64
[echoproperties] java.vm.version=20.1-b02
[echoproperties] ant.version=Apache Ant version 1.7.1 compiled on June 27 2008
[echoproperties] ant.core.lib=/home/jmorgan/.m2/repository/org/apache/ant/ant/1.7.1/ant-1.7.1.jar
[echoproperties] ant.java.version=1.6
[echoproperties] java.vendor.url=http\://java.sun.com/
[echoproperties] java.vm.vendor=Sun Microsystems Inc.使用插件的项目也使用Antrun插件。这是> Ant 1.8
[echoproperties] ant.core.lib=/home/jmorgan/.m2/repository/org/apache/ant/ant/1.8.2/ant-1.8.2.jar
[echoproperties] ant.java.version=1.6
[echoproperties] ant.project.default-target=package
[echoproperties] ant.project.invoked-targets=test
[echoproperties] ant.project.name=maven-antrun-
[echoproperties] ant.version=Apache Ant(TM) version 1.8.2 compiled on December 20 2010如果我在命令行上运行ant,就会得到
> ant -v
Apache Ant version 1.8.0 compiled on April 9 2010我所需要做的就是使用1.8的插件,我认为一切都应该就位。
任何帮助都非常感谢
发布于 2013-09-08 18:15:40
将ant添加到我的依赖项中,对问题进行排序
<plugin>
<groupId>com.xxxxx.shared</groupId>
<artifactId>xxxxx-shared_ant</artifactId>
<version>3.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
<version>1.0b3</version>
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<version>1.9.2</version>
</dependency>
<dependency>
<groupId>com.oopsconsultancy</groupId>
<artifactId>xmltask</artifactId>
<version>1.16</version>
</dependency>
</dependencies>
https://stackoverflow.com/questions/18673384
复制相似问题