dcsimg
JBuilder and relative path in Ant includes
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Andy_Kovtun
Posted On:   Wednesday, February 9, 2005 04:32 PM

All, I wonder if maybe you know a solution/workaround for my problem... I'm developing an Ant build script incorporated in our corporate Ant framework, so that's why I must include some external XML includes by using <!ENTITY> directive. Problem is that all these includes must be relative, like: <!ENTITY common SYSTEM "file:../../integ/ant/common.ae_xml"> (won't bother you with details but beleive me, absolute path is absolutely out of question in my case). Though, there is one nuisance about this approach... Ant calculates these paths from current run directory, which is OK when you run from command line - but    More>>

All,


I wonder if maybe you know a solution/workaround for my problem...


I'm developing an Ant build script incorporated in our corporate Ant framework, so that's why I must include some external XML includes by using <!ENTITY> directive. Problem is that all these includes must be relative, like:



			
<!ENTITY common SYSTEM "file:../../integ/ant/common.ae_xml">



(won't bother you with details but beleive me, absolute path is absolutely out of question in my case).


Though, there is one nuisance about this approach... Ant calculates these paths from current run directory, which is OK when you run from command line - but JBuilder refuses to parse the XML in editor (reporting a lost include) and thus doesn't display the script's targets in the context menu.

Well, there is a partial workaround: you can launch JBuilder from directory where the build.xml resides; but in my case, I have several buildfiles in different directories.


Interesting is that JBuilder is still able to launch Ant on this buildfile passing the correct run directory... So maybe there still is a way to persuade JBuilder's built-in XML parser that current directory for the XML file is not the JBuilder's rundir, but the actual directory where the build.xml is stored?

Or - maybe - there is a way to modify the ENTITY directive itself so XML itself tells the parser to build relative path starting from the file's path vs parsing tool's rundir?


My details: JBuilderX Developer, built-in Ant support.


Thanks in advance,

-andy

   <<Less

Re: JBuilder and relative path in Ant includes

Posted By:   Anonymous  
Posted On:   Thursday, February 10, 2005 04:52 AM

Have you tried instead of entity include?
About | Sitemap | Contact