File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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: 5852

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:
subject: Ant base dir problem
It's not a secret anymore!