Dennis,

many thanks: Your approach did the trick! (I am not yet too familiar with ANT)

Regards,
        Hans-Dieter Cordes

-----Original Message-----
From: Sherman, Dennis (END-CHI) [mailto:[EMAIL PROTECTED]
Sent: Mittwoch, 30. November 2005 16:29
To: 'user@xmlbeans.apache.org'
Subject: RE: xmlbeans ant task


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: user@xmlbeans.apache.org
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to