throw new BuildException(message);
}
importedFile = new File(getPath(importedFile));
IncludeProjectHelper importHelper = new IncludeProjectHelper(getOwningTarget(), this);
String savedAntFile = getProject().getProperty("ant.file");
getProject().setUserProperty("ant.file", importedFile.getAbsolutePath());
log("old ant.file=" + savedAntFile, Project.MSG_VERBOSE);
log("new ant.file=" + getProject().getProperty("ant.file"), Project.MSG_VERBOSE);
String savedBaseDir = getProject().getProperty("basedir");
getProject().setBasedir(importedFile.getParent());
log("old basedir=" + savedBaseDir, Project.MSG_VERBOSE);
log("new basedir=" + getProject().getProperty("basedir"), Project.MSG_VERBOSE);
importHelper.parse(getProject(), importedFile);
try {
nestedTask.perform();
} finally {
getProject().setUserProperty("ant.file", savedAntFile);
log("reset ant.file=" + getProject().getProperty("ant.file"), Project.MSG_VERBOSE);