Hello,

I am starting to use XMLBean. I have loaded the plugin for Eclipse and would
like to create a ant build file. I am also new in creating Ant file.

What I did until now is:

<project name="NeBiIntf" basedir="." default="compile">
        <description>
                Ant files for the NebiLight project
        </description>

        <!-- set global properties for this build -->
        <property environment="env"/>
        <property name="xsdLocation" location="Schemas"/>
        <property name="xsdbuild" location="build/xsd"/>
        <property name="dist"  location="dist"/>
        <property name="xsd.jar" location="lib/xsd"/>
        
        <target name="init">
                <!-- Create the time stamp -->
                <tstamp/>
                
                <!-- Create the build directory structure used by compile -->
                <mkdir dir="${xsdbuild}"/>
                
                <!-- Create the lib directory -->
                <mkdir dir="${xsd.jar}"/>
                
        <property name="xmlbeans.home" value="${env.XMLBEANS_HOME}"/>
        <echo message="xmlbeans.home: ${xmlbeans.home}"/>
                
                <!-- check for xbean.jar from binary distribution -->
                        <available
                            property="xmlbeans.lib"
                            value="${xmlbeans.home}/lib"
                            file="${xmlbeans.home}/lib/xbean.jar" />    
                
                <!-- Define the xmlbean task -->
                <taskdef name="xmlbean" 
classname="org.apache.xmlbeans.impl.tool.XMLBean"
classpath="C:\XMLBeans\xmlbeans-2.1.0\lib\xbean.jar" />

    </target>
    <!-- ================================= 
          target: compile              
         ================================= -->
        <target name="compile" depends="init" description="Xsd Java classes
generation">
            <!-- Generate the java classes from ${xsdLocation} into ${xsdbuild}
-->
                <echo message="Generating Java classes based on the xml 
schemas." />
                <xmlbean schema="Schemas" 
destfile="${xsdbuild}/NeBiLightSchemas.jar" >
                </xmlbean>
    </target>
</project>

My xsd files are located under the schemas directory. When trying to execute
this ant file, I got the following error:
BUILD FAILED
C:\data\build.xml:49: java.lang.NoClassDefFoundError:
javax/xml/stream/XMLStreamException

Any help would be appreciated.
-- 
View this message in context: 
http://www.nabble.com/Error-with-Ant-and-XMLBean-tf1918288.html#a5251270
Sent from the Xml Beans - User forum at Nabble.com.


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

Reply via email to