ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Butler" <jeffgbut...@gmail.com>
Subject Re: Abator overwriting generated SqlMap XML files
Date Sat, 10 Feb 2007 13:15:43 GMT
Some thoughts:

1. Abator includes an Ant task in the JAR so you can call it directly rather
than through the <java> task.  See the abator documentation for an example.

2. Abator *always* merges XML files, the overwrite flag is only for Java
files.  This is beacuse the JRE includes an XML parser but not a Java
parser.  This is also why the Eclipse plugin always merges both XML and Java
files - because the eclipse runtime includes a Java parser.

3. Abator will not overwrite additions you make to XML files, it would be
best to add your additions directly to the Abator generated XML files.

4. The XML merge does not deal with external entities (obviously).  I'll see
if there's anything I can do about that

Jeff Butler



On 2/9/07, Mark Volkmann <mark@ociweb.com> wrote:
>
> I'm running Abator from an Ant target like this.
>
>     <java jar="${abator.jar}" fork="true">
>       <!-- true to overwrite existing files, with the same name.
>            false to save newly generated files with a unique name
>            (dot number at end) -->
>       <arg line="AbatorConfig.xml false"/>
>     </java>
>
> Since I'm passing in "false", it shouldn't overwrite existing files.
> However, depending on the change I make to a generated SqlMap.xml
> file, it overwrites it anyway.
>
> If I add a new <select> element, the file doesn't get overwritten.
> However, if I put that <select> element in a new file and include it
> into the generated SqlMap.xml file using an external entity
> reference, Abator overwrites the file, throwing away my entity
> definition and reference.
>
> Here's what I added to the generated SqlMap.xml file.
>
> 1) Add an external entity definition inside
>      the closing > of the DOCTYPE like this.
>
>      [
>        <!ENTITY additions SYSTEM "item_SqlMap_additions.xml">
>      ]
>
>   2) Add a reference to this entity before
>      the closing </sqlMap> tag like this.
>
>      &additions;
>
>
>

Mime
View raw message