今天用Ant编译Lucene时抛出错误:
ivy is not available
原来是缺少一个ivy插件,ivy插件是用来智能管理dependency的。项目主页是http://ant.apache.org/ivy/ ,只需将ivy-version.jar放入下列目录即可:
/usr/share/ant/lib
${HOME}/.ant/lib
不过既然在用ant,那么不妨用ant自动将ivy放入它该去的地方。新建一个编译脚本:
<project name="demo" default="resolve" xmlns:ivy="antlib:org.apache.ivy.ant">
    <target name="bootstrap" description="Install ivy">
        <mkdir dir="${user.home}/.ant/lib"/>
        <get dest="${user.home}/.ant/lib/ivy.jar" src="http://search.maven.org/remotecontent?filepath=org/apache/ivy/ivy/2.3.0/ivy-2.3.0.jar"/>
    </target>
    <target name="resolve" description="Use ivy to resolve classpaths">
        <ivy:resolve/>
        <ivy:report todir='build/ivy-reports' graph='false' xml='false'/>
        <ivy:cachepath pathid="compile.path" conf="compile"/>
        <ivy:cachepath pathid="test.path"    conf="test"/>
    </target>
    <target name="clean" description="Cleanup build files">
        <delete dir="build"/>
    </target>
    <target name="clean-all" depends="clean" description="Additionally purge ivy cache">
        <ivy:cleancache/>
    </target>
</project>
然后一句ant bootstrap就完工了。

码农场
码农哥,我现在想搭个论坛,在sae感觉限制很多,现在犹豫,想转到bae3.0(这个开放了吗)来,还是阿里云,还是传统主机呢?有什么建议吗?