Question

I am working on a security project at my university for open source software. I am trying to build freemarker from source, but I am running into some problems. Everything that I can find online says that simple running 'ant' in the root directory should build the project. The only requirement is that you have ant v1.7.0 installed, which I do.

When I go into the root directory and type 'ant' I get the following output:

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
Was it helpful?

Solution

the build.xml does not have a default target. try this instead

ant compile

edit: changed target

OTHER TIPS

You'll also need Apache Ivy. We've changed the build process for some time now; it now uses Ivy instead of manual dependency management.

On Ubuntu/Debian installing Ivy also involves manually adding it to the ant classpath.

Whilst this may not be the cleanest way to do it [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

After installing ivy, running

ant compile

worked just fine.

Thank you!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top