我成功地用蚂蚁构建了CoffeeShop(https://github.com/lukacu/coffeeshop)。但是,我无法构建图像序列注释器Aibu。
pc-194-6:aibu June$ ant
Buildfile: /Users/liangjun/Documents/aibu/build.xml
常春藤:
BUILD FAILED
/Users/liangjun/Documents/aibu/build.xml:13: /Users/liangjun/.ant does not exist.
我在使用 ant build
构建罐子时遇到了类似的问题。我通过mkdir ~/.ant/lib
"解决"了它并重新运行ant compile jar
它成功运行。
似乎有点俗气:-)
尝试删除
<fileset dir="${user.home}/.ant/" includes="*.jar"/>
行在生成.xml文件中。
这是生成过程查找 Ivy 安装文件的位置。似乎他们不在这个目录中...
查看常春藤安装文档:
如果您只想在 ant 构建脚本中使用 Ivy,并且在构建时具有互联网连接,则可以从此站点下载 Ivy,并使用以下简单的构建代码段自动使用下载的版本:
<condition property="ivy.home" value="${env.IVY_HOME}">
<isset property="env.IVY_HOME" />
</condition>
<property name="ivy.home" value="${user.home}/.ant" />
<property name="ivy.jar.dir" value="${ivy.home}/lib" />
<property name="ivy.jar.file" value="${ivy.jar.dir}/ivy.jar" />
<target name="download-ivy" unless="offline">
<mkdir dir="${ivy.jar.dir}"/>
<!-- download Ivy from web site so that it can be used even without any special installation -->
<get src="http://repo2.maven.org/maven2/org/apache/ivy/ivy/${ivy.install.version}/ivy-${ivy.install.version}.jar"
dest="${ivy.jar.file}" usetimestamp="true"/>
</target>
<target name="init-ivy" depends="download-ivy">
<!-- try to load ivy here from ivy home, in case the user has not already dropped
it into ant's lib dir (note that the latter copy will always take precedence).
We will not fail as long as local lib dir exists (it may be empty) and
ivy is in at least one of ant's lib dir or the local lib dir. -->
<path id="ivy.lib.path">
<fileset dir="${ivy.jar.dir}" includes="*.jar"/>
</path>
<taskdef resource="org/apache/ivy/ant/antlib.xml"
uri="antlib:org.apache.ivy.ant" classpathref="ivy.lib.path"/>
</target>
不要忘记使用以下命令在本地缓存中发布咖啡店工件:
ant publish-working
在构建 aibu 项目之前。