Community
Participate
Working Groups
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE project [ <!ENTITY properties SYSTEM "file:properties.xml"> ]> causes an error in the ant editor which complains about not being able to find "file:properties.xml" (FileNotFoundException). Fixed by removing "file:" but ant editor should (?) recognise the file prefix as not being part of the filename. <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE project [ <!ENTITY properties SYSTEM "properties.xml"> ]> works fine. file: syntax works with ant 1.5.3 and 1.6.1 and is as used in Java Development with Ant.
Well if it is in Java Development with Ant we had better support it :-)
Well we get some of the blame but I would like to lay most of the blame on the Crimson parser not accepting the "file:" prefix...man I HATE XML parsing :-) Apache Ant ships with Xerces there for they guarantee the XML parser they are using. The Xerces parser correctly handles "file:". We do not ship with Xerces so we get the JAXP parser...which defaults to the Crimson implementation on JDK 1.4.* So the final story is that we had some tweaks to set the context classloader so that if the user specifies Xerces on their Ant runtime classpath (global) the Ant editor "uses" the Xerces parser and correctly handles "file:" After changing the global classpath to have or not to have the xerces JARs, you have to force the reparsing of the Ant editor. I have logged bug 60366. Changes to: AntModel: sets the thread context classloader appropriately so that the Xerces parser is found and used ProjectHelper: moved away from using the Apache Ant JAXPUtils as this caches the parser in a static var. Changed to lazy init the FileUtils as well. Created the two nls helper files: ProjectHelperMessages.java and ProjectHelperMessages.properties.
Please verify John-Mason.
Darin, Thanks for sorting this. A question though. As Ant 1.6.1 ships with XercesImpl.jar, shouldn't the Ant 1.6.1 plugine ship with this library too. Then you can guarantee (sort of) that eclipse's ant builder will parse in the same way as Ant. All best Andrew
No problem. Apache Ant has shipped with a Xerces implementation for some time. Before I took over the Ant integration is was decided that the Ant plugin should not contain Xerces; likely because in the past Eclipse had a separate Xerces plugin. I will talk this over with others but it think this would be unlikely to change especially as we are late in 3.0
*** Bug 69460 has been marked as a duplicate of this bug. ***