We do conditional compilation like this:
<!-- - - - - - - - - - - - - - - - - -
target: gen-xmlbeans
- - - - - - - - - - - - - - - - - -->
<target name="gen-xmlbeans" depends="init, set-schema.compile.notneeded"
unless="schema.compile.notneeded" >
<xmlbean schema="${module}.xsd" srcgendir="${src.dir}"
destfile="${dist.dir}/${module}.jar"
classpathref="compile.classpath"
debug="true" verbose="true"/>
</target>
<!-- - - - - - - - - - - - - - - - - -
target: set-schema.compile.notneeded
compare the schema datestamp to the jar file datestamp
- - - - - - - - - - - - - - - - - -->
<target name="set-schema.compile.notneeded">
<uptodate property="schema.compile.notneeded">
<srcfiles dir="${basedir}" includes="*.xsd"/>
<mapper type="glob" from="*.xsd" to="${dist.dir}/*.jar" />
</uptodate>
</target>
It's an ant thing, not an xmlbeans thing.
--
Dennis R. Sherman
Endeavor Information Systems
847-227-2976
[EMAIL PROTECTED]
http://www.endinfosys.com
-----Original Message-----
From: Cordes, Hans-Dieter [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 30, 2005 9:04 AM
To: [email protected]
Subject: xmlbeans ant task
Hello,
I use the "xmlbean" ant task (in the context of XMLBeans-1.0.3; I have to
use this version for compatibility reasons) like this:
<xmlbean classpath="${XMLBeans.jar}"
schema="${aots.xsd.dir}" destfile="${jar.dir}/Schema.AOTS.jar"
srcgendir="${aots.xmlbeans.gen.dir}/src"
classgendir="${aots.xmlbeans.gen.dir}/classes"/>
When I run that task in my "build" target, the whole process of generating
xmlbeans starts again, even if I did that a minute before. Is there a way to
do the xmlbeans generation conditionally, i.e. only if the XSD file has
changed?
And then a second question: Is there a way to search in the XMLBeans user
mailing list (http://mail-archives.apache.org/mod_mbox/xmlbeans-user/)?
There is probably some good stuff in there, but without a search capability
it is difficult to get your questions answered.
Thanks in advance for your help.
Regards,
Hans-Dieter Cordes
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]