xml-xmlbeans-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lance Robertson <lance.robert...@jda.com>
Subject RE: Putting XMLBeans into an existing Ant Build
Date Wed, 28 Jan 2004 21:31:18 GMT
Well it must have just been a non-saved file because I ran the build again
and it worked just fine that time. 

Thanks for all your help...I think I'm to the point I need to be right now
and it looks like XMLBeans will work for us.

Lance

-----Original Message-----
From: Lance Robertson [mailto:lance.robertson@jda.com] 
Sent: Wednesday, January 28, 2004 1:23 PM
To: 'xmlbeans-user@xml.apache.org'
Subject: RE: Putting XMLBeans into an existing Ant Build


Well I want to thank you all. I've got it pretty much into a build and it is
generating source but I do have one other issue.

It's generating a "schema" directory under the build directory and I'm
wanting it to just generate the java files under the source directory.

So we have this as our "generated" directory
Build\
Build\src -- For generated source code
Build\src\com - Where all generated java files are put in their respective
package locations Build\classes -- For compiled classes


When I run my ant build the following are added
Build\schema\
Build\schema\element\_nons\
Build\schema\javaname\ -- All code is placed in here under the com package
names Build\schema\namespace\_nons\ Build\schema\src\Some Weird Directory
Name Build\schema\system\Another Weird Directory Name


I would like the code put in the Build\src directory under it's respective
com package. I pasted below the parts of the xml file that pertain to the
xmlbeans stuff. Any clues on how to get it to generate source into
Build\src\com... Would be much appreciated. If I have to go in schema I
guess that isn't the worst but would prefer not to.


Which is used in the build.xml file

	<property name="build.dir" value="${basedir}/build"/>
	<property name="src.dir" value="${basedir}/src"/>
	<property name="classes.dir" value="${build.dir}/classes"/>
	<property name="server.src.dir" value="../Server/src"/>
	<property name="gen.src.dir" value="${build.dir}/src"/>
	<property name="schema.dir" value="${basedir}/xsd"/>
	....
	<taskdef name="xmlbean"
classname="org.apache.xmlbeans.impl.tool.XMLBean">
		<classpath>
			<fileset dir="${root.dir}/Libraries/XML">
				<include name="**/*.jar"/>
			</fileset>
		</classpath>
	</taskdef>
	....
	<target name="schema" if="xsd" description="Generates Java files
based on schema">
		<xmlbean classgendir="${build.dir}" failonerror="true">
			<fileset dir="${schema.dir}" includes="**/*.*"/>
		</xmlbean>
	</target>
	....
	<target name="schema" if="xsd" description="Generates Java files
based on schema">
		<xmlbean classgendir="${build.dir}"
srcgendir="${gen.src.dir}" srconly="true" failonerror="true">
			<fileset dir="${schema.dir}" includes="**/*.*"/>
		</xmlbean>
	</target>


Thanks,

Lance

- ---------------------------------------------------------------------
To unsubscribe, e-mail:   xmlbeans-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-user-help@xml.apache.org Apache
XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/

- ---------------------------------------------------------------------
To unsubscribe, e-mail:   xmlbeans-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-user-help@xml.apache.org
Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/


Mime
View raw message