users@jaxb.java.net

Re: Help with maven 2 plugin for jaxb 1.x

From: Kostis Anagnostopoulos <ankostis_at_gmail.com>
Date: Tue, 16 Jan 2007 13:56:41 +0200

Hello Vidya,

On 1/16/07, vidyamahavadi <vidya.mahavadi_at_rmb.co.za> wrote:
>
> Hi,
>
> I am using the same plugin org.jvnet.jaxb1.maven2 and It is generating all
> Jaxb classes. However, I have a small problem. Since it is not creating the
> files in the correct package that I mention in <configuration> like this..
>
> <plugin>
> <groupId>org.jvnet.jaxb1.maven2</groupId>
> <artifactId>maven-jaxb1-plugin</artifactId>
> <version>1.0-rc6</version>
> <executions>
> <execution>
> <goals>
> <goal>generate</goal>
> </goals>
>
> <configuration>
> <schemaDirectory>src/main/xsd</schemaDirectory>
> <packageName>za.co.rmb.calypso.binding.extract</packageName>
> <outputDirectory>target/generated-sources/jaxb</outputDirectory>
> </configuration>
> </execution>
> </executions>
> </plugin>
>
> It creates the classes in the default name space (za.co.rmb). Please check
> my configuration and let me know if there is anything missing. Any help on
> this is much appriciated.

The mojo parameter you are searching is called 'generatePackage'.
See https://maven-jaxb1-plugin.dev.java.net/nonav/plugin-docs/generate-mojo.html

If in doubt whether a param has been considered, you can always use
the 'verbose' param, preferably from the cmd-line (without edditing
the pom.xml), like that:

  mvn package -Dmaven.xjc1.verbose

Greetings,
  Kostis