From 1c8e55cc3ac54e68f951bef6e1a77be94ccf7825 Mon Sep 17 00:00:00 2001 From: Matthew Jason Benson Date: Thu, 31 Aug 2006 20:40:26 +0000 Subject: [PATCH] Be more specific logging imports. git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@439042 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/org/apache/tools/ant/taskdefs/ImportTask.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main/org/apache/tools/ant/taskdefs/ImportTask.java b/src/main/org/apache/tools/ant/taskdefs/ImportTask.java index 78a8fadb5..6cacd7432 100644 --- a/src/main/org/apache/tools/ant/taskdefs/ImportTask.java +++ b/src/main/org/apache/tools/ant/taskdefs/ImportTask.java @@ -111,11 +111,7 @@ public class ImportTask extends Task { throw new BuildException("Unable to get location of import task"); } - File buildFile = new File(getLocation().getFileName()); - buildFile = new File(buildFile.getAbsolutePath()); - - getProject().log("Importing file " + file + " from " - + buildFile.getAbsolutePath(), Project.MSG_VERBOSE); + File buildFile = new File(getLocation().getFileName()).getAbsoluteFile(); // Paths are relative to the build file they're imported from, // *not* the current directory (same as entity includes). @@ -123,6 +119,9 @@ public class ImportTask extends Task { File buildFileParent = new File(buildFile.getParent()); File importedFile = FILE_UTILS.resolveFile(buildFileParent, file); + getProject().log("Importing file " + importedFile + " from " + + buildFile.getAbsolutePath(), Project.MSG_VERBOSE); + if (!importedFile.exists()) { String message = "Cannot find " + file + " imported from "