XML include fails in ANT build file
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Adam_Ratcliffe
Posted On:   Sunday, July 14, 2002 02:19 AM

I would like to include build files in project subdirectories that can be used to build a subset of the project. I defined the following code in a subdirectory build file to reference a parent file that contains generic project build targets: <?xml version="1.0" encoding="utf-8" standalone="yes"?> <!ENTITY main SYSTEM "../../build.xml"> ]> &main; Using xerces as my parser, when I invoke the build file it fails with the following message: BUILD FAILED /home/adam/dev/web_calendar/src/calendar/build.xml:5: Unexpected element "project"    More>>

I would like to include build files in project subdirectories that can be used to build a subset of the project.



I defined the following code in a subdirectory build file to reference a parent file that contains generic project build targets:


			
<?xml version="1.0" encoding="utf-8" standalone="yes"?>

<!ENTITY main SYSTEM "../../build.xml">
]>

&main;




Using xerces as my parser, when I invoke the build file it fails with the following message:


BUILD FAILED


/home/adam/dev/web_calendar/src/calendar/build.xml:5: Unexpected element "project"



Have I overlooked something obvious here ......


Regards,


Adam Ratcliffe    <<Less

Re: XML include fails in ANT build file

Posted By:   Erik_Hatcher  
Posted On:   Sunday, July 14, 2002 05:43 PM

Looks like you are trying to include a full build file into another. This is not how it works. The entity reference include mechanism is for including build file fragments.

Re: XML include fails in ANT build file

Posted By:   Eugene_Kuleshov  
Posted On:   Sunday, July 14, 2002 05:40 PM

How your ../../build.xml looks like?
About | Sitemap | Contact