File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Ant base dir problem" Watch "Ant base dir problem" New topic
Author

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
author
Bartender

Joined: May 14, 2008
Posts: 5823
    
    7

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/build.xml
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