From c04d3e26a9afaea3f3c8474e0f6414cb6bc5f535 Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Thu, 17 Nov 2011 12:04:16 +0000 Subject: [PATCH] if specified stylesheet doesn't exist, log the file resolved relative to project rather than the task's basedir git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@1203162 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java b/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java index 0766307eb..61d2b0af8 100644 --- a/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java +++ b/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java @@ -359,15 +359,16 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger { // via style attribute File stylesheet = getProject().resolveFile(xslFile); if (!stylesheet.exists()) { - stylesheet = FILE_UTILS.resolveFile(baseDir, xslFile); + File alternative = FILE_UTILS.resolveFile(baseDir, xslFile); /* * shouldn't throw out deprecation warnings before we know, * the wrong version has been used. */ - if (stylesheet.exists()) { + if (alternative.exists()) { log("DEPRECATED - the 'style' attribute should be " + "relative to the project's"); log(" basedir, not the tasks's basedir."); + stylesheet = alternative; } } FileResource fr = new FileResource();