[英]Building Freemarker from source
我正在我的大学里从事一个开源软件的安全项目。 我正在尝试从源代码构建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
build.xml没有默认目标。 试试这个代替
ant compile
编辑:更改目标
您还需要Apache Ivy。 现在,我们已经更改了构建过程一段时间; 现在,它使用Ivy代替了手动依赖管理。
在Ubuntu / Debian上,安装Ivy还涉及手动将其添加到ant classpath中。
尽管这可能不是最干净的方法[1]
sudo ln -s /usr/share/java/ivy.jar /usr/share/ant/lib/ivy.jar
安装常春藤后,运行
ant compile
工作得很好。
谢谢!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.