You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xmlbeans.apache.org by Sascha Sadat-Guscheh <sa...@systemone.at> on 2005/09/20 16:11:52 UTC

newbie question oncerning ant task for xmlbeans

hi ..

for the last 2 month i've been using scomp to generate my xmlbeans 
stuff. because we are working in a bigger group now, it's now not very 
useful
that each programmer needs to know how to run scomp. Therefore i wanted 
to write an ant task which looks like this:

<taskdef name="xmlbean"
     classname="org.apache.xmlbeans.impl.tool.XMLBean"
     classpath="lib/xbean.jar:lib/jsr173_api.jar" />

<target name="build.transport.data">
    <xmlbean schema="some-schema.xsd" destfile="some.jar"
        javasource="1.5" classpath="lib/xbean.jar:lib/jsr173_api.jar" />
</target>

so far so good, but i run into some problems:
- the generating process doesn't find the some-schema.xsdconfig (which 
is in the same directory) and i can't find a option for the ant-task 
(contrary to scomp) to specify the xsdconfig
    scomp -out some.jar -javasource 1.5 -src /src some-schema.xsd 
some-schema.xsdconfig        (this call works fine!)
- when i use the option javasource="1.4" the jar gets generated but the 
package info is wrong (information which is in the .xsdconfig file)
- when i use the option javasource="1.5" i get an compilation error 
(generics not supported), which is really strange, because there's only 
a jdk1.5 installed on the machine

any ideas?

c sascha
   

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org


Re: newbie question oncerning ant task for xmlbeans

Posted by Eddie O'Neil <ek...@bea.com>.
   I've had the *.xsd and *.xsdconfig files picked up by passing a 
*directory* to the "schema" attribute on the <xmlbean> task.

   This causes everything in the directory to be included in the schema 
compilation.  So try something like:

   <xmlbean schema="/a/schema/dir"
            destfile="some.jar"
            classpath="lib/xbean.jar:lib/jsr173_api.jar"/>

   Hope that helps.

Eddie




Sascha Sadat-Guscheh wrote:
> hi ..
> 
> for the last 2 month i've been using scomp to generate my xmlbeans 
> stuff. because we are working in a bigger group now, it's now not very 
> useful
> that each programmer needs to know how to run scomp. Therefore i wanted 
> to write an ant task which looks like this:
> 
> <taskdef name="xmlbean"
>     classname="org.apache.xmlbeans.impl.tool.XMLBean"
>     classpath="lib/xbean.jar:lib/jsr173_api.jar" />
> 
> <target name="build.transport.data">
>    <xmlbean schema="some-schema.xsd" destfile="some.jar"
>        javasource="1.5" classpath="lib/xbean.jar:lib/jsr173_api.jar" />
> </target>
> 
> so far so good, but i run into some problems:
> - the generating process doesn't find the some-schema.xsdconfig (which 
> is in the same directory) and i can't find a option for the ant-task 
> (contrary to scomp) to specify the xsdconfig
>    scomp -out some.jar -javasource 1.5 -src /src some-schema.xsd 
> some-schema.xsdconfig        (this call works fine!)
> - when i use the option javasource="1.4" the jar gets generated but the 
> package info is wrong (information which is in the .xsdconfig file)
> - when i use the option javasource="1.5" i get an compilation error 
> (generics not supported), which is really strange, because there's only 
> a jdk1.5 installed on the machine
> 
> any ideas?
> 
> c sascha
>  
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
> For additional commands, e-mail: dev-help@xmlbeans.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org