Browse Source

People should not think that "file:../master.xml" is a meaningful URI.

Ant historically supports it but normal XML parsers do not.


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@425879 13f79535-47bb-0310-9956-ffa450edef68
master
Jesse N. Glick 19 years ago
parent
commit
585cd59bf5
2 changed files with 10 additions and 0 deletions
  1. +5
    -0
      src/main/org/apache/tools/ant/helper/ProjectHelper2.java
  2. +5
    -0
      src/main/org/apache/tools/ant/helper/ProjectHelperImpl.java

+ 5
- 0
src/main/org/apache/tools/ant/helper/ProjectHelper2.java View File

@@ -477,6 +477,11 @@ public class ProjectHelper2 extends ProjectHelper {
File file = new File(path);
if (!file.isAbsolute()) {
file = FILE_UTILS.resolveFile(context.getBuildFileParent(), path);
context.getProject().log(
"Warning: '" + systemId + "' in " + context.getBuildFile() +
" should be expressed simply as '" + path.replace('\\', '/') +
"' for compliance with other XML tools",
Project.MSG_WARN);
}
context.getProject().log("file=" + file, Project.MSG_DEBUG);
try {


+ 5
- 0
src/main/org/apache/tools/ant/helper/ProjectHelperImpl.java View File

@@ -296,6 +296,11 @@ public class ProjectHelperImpl extends ProjectHelper {
File file = new File(path);
if (!file.isAbsolute()) {
file = FILE_UTILS.resolveFile(helperImpl.buildFileParent, path);
helperImpl.project.log(
"Warning: '" + systemId + "' in " + helperImpl.buildFile +
" should be expressed simply as '" + path.replace('\\', '/') +
"' for compliance with other XML tools",
Project.MSG_WARN);
}
try {
InputSource inputSource = new InputSource(new FileInputStream(file));


Loading…
Cancel
Save