How to use jaxb_commons plugins from maven
Posted
by
user243155
on Stack Overflow
See other posts from Stack Overflow
or by user243155
Published on 2010-01-04T12:10:05Z
Indexed on
2012/09/02
9:38 UTC
Read the original article
Hit count: 205
I'm trying to use a jaxb plugin to insert a interface into a choice element generating the classes from maven. The problem is that I can't seem to figure out how to do so from maven, the repository isn't clear from the documentation and the only example (bellow) doesn't work, it seems to ignore the plugin (maven reports no error about not finding it) or the plugin doesn't have all the adds-ons currently listed in the project documentation:
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.6.1</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<generatePackage>br.com.wonder.nfe.xml</generatePackage>
<args>
<arg>-Xifins</arg>
</args>
<plugins>
<plugin>
<groupId>org.jvnet.jaxb2_commons</groupId>
<artifactId>basic</artifactId>
<version>0.4.1.5</version>
</plugin>
</plugins>
</configuration>
</plugin>
I have these in the root pom:
<pluginRepositories>
<pluginRepository>
<id>maven2-repository.dev.java.net</id>
<url>http://download.java.net/maven/2</url>
</pluginRepository>
<pluginRepository>
<id>maven-repository.dev.java.net</id>
<name>Java.net Maven 1 Repository (legacy)</name>
<url>http://download.java.net/maven/1</url>
<layout>legacy</layout>
</pluginRepository>
</pluginRepositories>
Running that gives:
Error while setting CmdLine options '[-Xifins, -episode, /home/administrador/JavaApp/wnfe3/wnfe-ejb/target/generated-sources/xjc/META-INF/sun-jaxb.episode]'!
Embedded error: unrecognized parameter -Xifins
© Stack Overflow or respective owner