Browse Source

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
master
Stefan Bodewig 13 years ago
parent
commit
c04d3e26a9
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java

+ 3
- 2
src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java View File

@@ -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();


Loading…
Cancel
Save