|
RE: scomp question: msg#00097text.xml.xmlbeans.user
Or, using scomp: scomp -srconly -d app1types -cp common.jar app1.xsd The reason I am using srconly is to not compile the generated Java files. If you want that too, you would have to add the path to your xbean.jar in "-cp". -----Original Message----- From: David Jencks [mailto:david_jencks@xxxxxxxxx] Sent: Thursday, January 13, 2005 11:37 AM To: user@xxxxxxxxxxxxxxxxxxx Subject: Re: scomp question This is easy to do if you use maven and the [geronimo]-maven-xmlbeans plugin. I think there is a version in xmlbeans source but I don't know if it ever got released. --make sure each xsd is in a separate maven (sub) project -- in each project.xml's dependency section list the modules whose schema you would like to be in the classpath. A dependency should look something like this: <dependency> <groupId>geronimo</groupId> <artifactId>geronimo-connector-builder</artifactId> <version>${pom.currentVersion}</version> <properties> <xmlbeans>true</xmlbeans> </properties> </dependency> the <properties> <xmlbeans>true</xmlbeans> </properties> part puts the dependency jar on the xmlbeans classpath. In your maven.xml add a preGoal like: <preGoal name="java:compile"> <xmlbeans:schema2java sourcedir="${basedir}/src" sourceschema="schema/geronimo-connector_1_5.xsd" xmlconfigs="${basedir}/src/schema/xmlconfig.xml" targetdir="${basedir}/target/xmlbeans" cataloglocation="${basedir}/../j2ee-schema/src/catalog/resolver- catalog.xml"/> </preGoal> indicating which schemas from the current project you wish to compile. There are lots of examples of this in the geronimo project: most xxx-builder modules use this. If nowhere else, the plugin is located at http://www.ibiblio.org/maven/geronimo/plugins/geronimo-xmlbeans-plugin -1.0-M1.jar thanks david jencks On Jan 13, 2005, at 10:54 AM, Dogan Atay wrote: > Hi, > I have the following scenario: > I have a set of schemas; > common.xsd, sub11.xsd, sub12.xsd, app1.xsd. > Each of these schemas has their own target namespaces. > These schemas are related to each other in the following way: > sub11 imports common > sub12 imports common > app1 imports sub11, sub12 and common > > app1, sub11 and sub12 are application specific schemas whereas > common.xsd is a general purpose schema which can be imported by other > schemas (i.e. sub21, sub22, and app2) > > What I want is the following: > I want to scomp common.xsd and get a common.jar with all the common > schema types in it. > > Then I want to scomp app1.xsd to generate app1.jar BUT I do not want > it to include the generated the schema types that are in common.jar > already. > > So I have generated common.jar, put that in the classpath and now > ready to scomp app1. Is there a way, directly from scomp command > options or .xsdconfig, that I can accomplish this goal? > > > > If there is not I guess I will end up with app1.jar and app2.jar which > to the most part will contain schema types from common.xsd. > > > > > Thanks, > > Dogan Atay --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@xxxxxxxxxxxxxxxxxxx For additional commands, e-mail: user-help@xxxxxxxxxxxxxxxxxxx |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: scomp question: 00097, David Jencks |
|---|---|
| Next by Date: | Does XMLBeans expose annotation and appinfo elements?: 00097, Jim McMaster |
| Previous by Thread: | Re: scomp questioni: 00097, David Jencks |
| Next by Thread: | Does XMLBeans expose annotation and appinfo elements?: 00097, Jim McMaster |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |