put jsr jar into classpath too.

be_tnt wrote:
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.


La información contenida en el presente e-mail es confidencial y está reservada 
para el uso exclusivo de su destinatario. Se prohíbe estrictamente la 
distribución, copia o utilización de esta información sin el previo permiso de 
su destinatario. Si usted no fuera el destinatario, por favor notifíquelo 
inmediatamente al remitente y elimine el presente mensaje de su sistema 
informático.

Information contained in this e-mail is confidential and is intended for the 
use of the addressee only. Any dissemination, distribution, copying or use of 
this communication without prior permission of the addressee is strictly 
prohibited. If you are not the intended addressee, please notify the sender 
immediately by reply and then delete this message from your computer system.

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

Reply via email to