You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xmlbeans-user@xml.apache.org by Javier Ramos <ra...@parsec.es> on 2003/12/05 16:48:35 UTC
xmlbeans dependent jars ( again a lengthy one )
Hi all,
I am using a maven project to generate a jar file ( say, jar A )
containing xmlbeans generated java code from XML schema definitions. I want
to generate a new similar project which will extend some of the schemas, and
thus will generate into a new jar ( jar B ) new classes that extend the ones
in the previous jar. I would like to keep the classes in separate jars, but
I am finding difficulty in doing so. The problem is that my second project,
for some reason, does not generate jar B successfully.
Everything goes perfectly if I just copy the all xsd's into the B
project and generate just one jar. But this is not the idea, I want to
separate the 'base' schemas and classes in a jar and the extensions in
another one.
Here are the dependencies in project.xml for both projects:
Project A dependencies:
---------------------------------------
<dependencies>
<dependency>
<groupId>xmlbeans</groupId>
<artifactId>xbean</artifactId>
<version/>
<jar>xbean.jar</jar>
</dependency>
</dependencies>
---------------------------------------
Project B dependencies:
---------------------------------------
<dependencies>
<dependency>
<groupId>xmlbeans</groupId>
<artifactId>xbean</artifactId>
<version/>
<jar>xbean.jar</jar>
</dependency>
<dependency>
<groupId>waf</groupId>
<artifactId>waf-xmlbind</artifactId>
<version>SNAPSHOT</version>
</dependency>
</dependencies>
---------------------------------------
And here is maven.xml for both projects:
---------------------------------------
<project default="jar" xmlns:j="jelly:core" xmlns:deploy="deploy">
<goal name="jbind">
<attainGoal name="xmlbind:generate" />
</goal>
<preGoal name="java:compile">
<attainGoal name="xmlbind:generate" />
</preGoal>
<taskdef name="xmlbean" classname="org.apache.xmlbeans.impl.tool.XMLBean">
<classpath id="cp">
<path refid="maven.dependency.classpath"/>
</classpath>
</taskdef>
<goal name="remove_java_files">
<delete includeEmptyDirs="true">
<fileset dir="src/java"/>
</delete>
</goal>
<goal name="xmlbind:generate">
<attainGoal name="remove_java_files" />
<xmlbean
srcgendir="src/java"
classgendir="target/classes"
destfile="waf-xmlbind.jar" ------> this is for project A, for B
destfile is different
classpathref="cp"
schema="src/xsd">
</xmlbean>
</goal>
</project>
---------------------------------------
And finally the error I get when generating project B is:
---------------------------------------
D:\NewProjects\nparsys-master\nparsys\nparsys-xmlbind>maven
parsec:install-snaps
hot
__ __
| \/ |__ _Apache__ ___
| |\/| / _` \ V / -_) ' \ ~ intelligent projects ~
|_| |_\__,_|\_/\___|_||_| v. 1.0-rc2-SNAPSHOT
Intentando descargar waf-xmlbind-SNAPSHOT.jar.
parsec:artifact:
[echo] Running jar:jar for Reservations Site
Overriding previous definition of reference to clover.classpath
java:prepare-filesystem:
java:compile:
xmlbind:generate:
remove_java_files:
[delete] Deleting 121 files from
D:\NewProjects\nparsys-master\nparsys\npars
ys-xmlbind\src\java
[delete] Deleted 45 directories from
D:\NewProjects\nparsys-master\nparsys\n
parsys-xmlbind\src\java
Time to build schema type system: 1.61 seconds
[xmlbean] [ERROR] Exception while building schemas: null
BUILD FAILED
File...... file:/D:/NewProjects/nparsys-master/nparsys/nparsys-xmlbind/
Element... xmlbean
Line...... 29
Column.... 23
org.apache.tools.ant.BuildException
Total time: 8 seconds
Finished at: Fri Dec 05 16:21:53 CET 2003
---------------------------------------
Does anybody have an idea as to why this happens? Am I doing something
incorrectly?
Any help would be greatly appreciated.
And thanks for the patience to everyone that reads this.
Javier Ramos
- ---------------------------------------------------------------------
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/