conor       01/02/19 06:03:43

  Modified:    src/main/org/apache/tools/ant Tag: ANT_13_BRANCH
                        ProjectHelper.java
  Log:
  Make inclusion work under JDKs prior to 1.3
  Note that currently the IncludeTest fails under
  JDK 1.1 but the inclusions seem to work on the
  command line
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.47.2.2  +9 -2      
jakarta-ant/src/main/org/apache/tools/ant/ProjectHelper.java
  
  Index: ProjectHelper.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/ProjectHelper.java,v
  retrieving revision 1.47.2.1
  retrieving revision 1.47.2.2
  diff -u -r1.47.2.1 -r1.47.2.2
  --- ProjectHelper.java        2001/02/18 13:05:04     1.47.2.1
  +++ ProjectHelper.java        2001/02/19 14:03:43     1.47.2.2
  @@ -104,12 +104,17 @@
           try {
               SAXParser saxParser = getParserFactory().newSAXParser();
               parser = saxParser.getParser();
  -            
  +
               String uri = "file:" + buildFile.getAbsolutePath().replace('\\', 
'/');
               for (int index = uri.indexOf('#'); index != -1; index = 
uri.indexOf('#')) {
                   uri = uri.substring(0, index) + "%23" + 
uri.substring(index+1);
               }
  -            saxParser.parse(uri, new RootHandler());
  +            
  +            inputStream = new FileInputStream(buildFile);
  +            inputSource = new InputSource(inputStream);
  +            inputSource.setSystemId(uri);
  +            project.log("parsing buildfile " + buildFile + " with URI = " + 
uri, Project.MSG_VERBOSE);
  +            saxParser.parse(inputSource, new RootHandler());
           }
           catch(ParserConfigurationException exc) {
               throw new BuildException("Parser has not been configured 
correctly", exc);
  @@ -212,6 +217,8 @@
            */
           public InputSource resolveEntity(String publicId,
                                            String systemId) {
  +        
  +            project.log("resolving systemId: " + systemId, 
Project.MSG_VERBOSE);
           
               if (systemId.startsWith("file:")) {
                   String path = systemId.substring(5);
  
  
  

Reply via email to