从源代码构建Freemarker

时间:2009-07-01 02:04:13

标签: java security ant build-process freemarker

我正在为我的大学开设一个开源软件的安全项目。我正在尝试从源代码构建freemarker,但我遇到了一些问题。我在网上找到的所有东西都说根目录中运行'ant'的简单方法应该构建项目。唯一的要求是你安装了ant v1.7.0,我这样做了。

当我进入根目录并输入'ant'时,我得到以下输出:

Buildfile: build.xml

init:

_autoget-deps:

update-deps:
     [echo] Getting dependencies...
     [echo] -------------------------------------------------------

BUILD FAILED
/media/osr/runs/java/freemarker/freemarker/trunk/freemarker/build.xml:64: The following error occurred while executing this line:
/media/osr/runs/java/freemarker/freemarker/trunk/freemarker/build.xml:567: The following error occurred while executing this line:
/media/osr/runs/java/freemarker/freemarker/trunk/freemarker/build.xml:575: Problem: failed to create task or type antlib:org.apache.ivy.ant:settings
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.

This appears to be an antlib declaration. 
Action: Check that the implementing library exists in one of:
        -/usr/share/ant/lib
        -/home/murrayj/.ant/lib
        -a directory added on the command line with the -lib argument


Total time: 0 seconds

4 个答案:

答案 0 :(得分:2)

build.xml没有默认目标。试试这个

ant compile

修改:更改目标

答案 1 :(得分:1)

您还需要Apache Ivy。我们已经改变了构建过程一段时间了;它现在使用Ivy而不是手动依赖管理。

答案 2 :(得分:1)

在Ubuntu / Debian上安装Ivy还涉及手动添加它 蚂蚁类路径。

虽然这可能不是最干净的方法[1]

sudo ln -s /usr/share/java/ivy.jar /usr/share/ant/lib/ivy.jar

[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=547969

答案 3 :(得分:0)

安装常春藤后,运行

ant compile

工作得很好。

谢谢!

相关问题