I am trying to import an existing ant build using ant.importBuild.  This will
import all the ant targets, but uses the the project directory for the
basedir instead of the basedir that is specified in the build.xml (which is
'/../../' for my example).  This causes the import of property files and
taskdefs to fail.  I was able to set the basedir using
ant.properties.basedir=file('/../../') which will now successfully import
the property files and taskdefs, but running some of the ant targets causes
odd behavior.  Adding some echo statements, I can see that the basedir is
set correctly inside the targets, but if I modify the target/task in gradle
and echo the basedir for that task, it is still set to the project
directory.  This can be seen by creating and ant target to copy files
specified with a fileset.  If the fileset is a relative path, it will pick
up the basedir from the gradle task instead of the ant target.

My current work around is to grab all the tasks, iterate through them
setting the basedir.  Is there a better way to handle this?  I still
experience other issues that I haven't found an exact cause for.

--
View this message in context: 
http://gradle.1045684.n5.nabble.com/ant-importBuild-doesn-t-import-tasks-target-with-ant-basedir-tp4731920p4731920.html
Sent from the gradle-user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to