The moose likes Ant, Maven and Other Build Tools and the fly likes Ant base dir problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Ant base dir problem" Watch "Ant base dir problem" New topic

Ant base dir problem

Nikos Stavros
Ranch Hand

Joined: Feb 24, 2006
Posts: 243

i tried this because my build file was non in the src folder and the complile task was not paths correctly, so I tried this:

<project name="nikos.custom.ant.builds" basedir="../src">

but then nothing worked,

saying stiff like mxmlc cannot be found.

<taskdef name="mxmlc" classname="flex.ant.MxmlcTask" classpath="${FLEX_HOME}/ant/lib/flexTasks.jar"/>

Any ideas?

Jesus lives
Peter Johnson

Joined: May 14, 2008
Posts: 5779

Ant uses basedir as the project's main directory and thus expects almost everything to be relative to that directory. Setting the basdir to the src directory is probably going to mess things up. But it all really depends on your project's directory structure. A typical project should have a structure such as:

project/src/** (your Java sources go here)
project/bin/** (your compiled Java classes go here)

and so on. Thus the build.xml is in the base directory of the project (basedir=".").

JBoss In Action
I agree. Here's the link: http://aspose.com/file-tools
subject: Ant base dir problem
Similar Threads
Ant path issue
Ant Path problem
Using ant to over multiple packages
how to tell ant that some packages are needed?
How to Compile Multiple MXML files(FLEX) from ANT