users@jaxb.java.net

Re: generating from xsd with xml catalog

From: DSL <dlaprade_at_gmail.com>
Date: Tue, 25 Mar 2008 12:36:32 -0400

Ok, after a few days of testing and debugging, I have solved a few of
the problems.

1. Bad maven dependencies.

Now I am getting and error:

[ERROR] unknown location

I think it does not like the "classpath:" in my xml catalog. How can
you tell it to look on the classpath for that resource?

I would like to also know, how do you tell it not to generate jaxb
objects for a given URI?



On Thu, Mar 20, 2008 at 4:47 PM, DSL <dlaprade_at_gmail.com> wrote:
> I am having issues generating from my XSD files from maven, it does
> not seem to be using my xml catalog. Here is my maven plugin call:
>
> <plugin>
> <groupId>com.sun.tools.xjc.maven2</groupId>
> <artifactId>maven-jaxb-plugin</artifactId>
> <executions>
> <execution>
> <goals>
> <goal>generate</goal>
> </goals>
> </execution>
> </executions>
> <configuration>
> <catalog>src/main/resources/META-INF/jax-ws-catalog.xml</catalog>
> <schemaDirectory>
> src/main/resources
> </schemaDirectory>
> <includeSchemas>
> <includeSchema>myschema.xsd</includeSchema>
> </includeSchemas>
> <generateDirectory>
> ${basedir}/target/generated-sources
> </generateDirectory>
> <strict>true</strict>
> <verbose>true</verbose>
> </configuration>
> </plugin>
>
>
> Here is my catalog file:
>
> <?xml version="1.0"?>
> <catalog prefer="system" xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
>
> <rewriteURI rewritePrefix="classpath:external.xsd"
> uriStartString="http://external.com/external.xsd"/>
>
> </catalog>
>
> Getting error:
>
> [ERROR] src-resolve: Cannot resolve the name 'EXTERNAL:source' to a(n)
> 'element declaration' component.
>
>
> Any ideas what I might be doing incorrectly would be appreciated.
>
> --
> ------------
> Success is the abiilty to go from one failure to another with no loss
> of enthusiasm. - Winston Churchill
>



-- 
------------
Success is the abiilty to go from one failure to another with no loss
of enthusiasm.  - Winston Churchill