This is fine for a workaround, but everybody on our team doesn't have the source mapped to the same directory, so full paths aren't possible.
 
BTW Matt, thanks for posting this question...it solved one of our problems with ant (we hadn't thought of using ENTITY to include common build files...we had a hacked up way of doing it).
 
-- Rick
-----Original Message-----
From: Anton Katilin [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 03, 2001 4:53 AM
To: [EMAIL PROTECTED]
Subject: Re: [Eap-list] External entities in ant script don't work

Hello Matt,
 
Please try to specify full paths to the file you include (please note the form):
 
    <!ENTITY build-common SYSTEM "file:///c:/MyDirectory/build-common.xml">
 
Best regards,
Anton Katilin
-----------------------------------------------------------
IntelliJ Software, "Develop with pleasure"
http://www.intellij.com/
-----------------------------------------------------------
 
 
----- Original Message -----
Sent: Sunday, December 02, 2001 10:57 PM
Subject: [Eap-list] External entities in ant script don't work


Hi all,

I'm evaluating IDEA for use within my development group.  We use Ant for all our java building.  The way our Ant system works is that we have some common files which include the majority of our ant build logic, so that each project only has to write a very simple build file consisting mostly of setting properties.  Each project file then includes the contents of the common files via an XML external parsed entity as shown below.  Unfortunately, this seems to break IDEA's (Pandora build 525) ability to parse the XML file (though running Ant itself works fine).  The file parses just fine if I blit the contents of the common files directly innto my project build file.  Does anyone know of a way to work around this?  What of the chances of this being fixed in the near future?  I'd imagine this is a fairly common pattern for anyone using Ant across multiple development projects.  Any help appreciated, thanks,


Matt
[EMAIL PROTECTED]


e.g. of failing build files:

build.xml:

<!DOCTYPE project [
    <!ENTITY build-common SYSTEM "build-common.xml">
    ] >

<project name="ant-test" default="all">

    <!--
        When using entity, the project builds, but IDEA doesn't display
        targets in "Ant Build"
    -->
    &build-common;

    <!-- Everyting works fine when I blit the entity in here
    <target name="all">
        <echo message="Hi there"/>
    </target>
    -->

</project>


build-common.xml:

<target name="all">
        <echo message="Hi there"/>
</target>

Reply via email to