users@jaxb.java.net

Re: problem using jaxb2 basics to generate toString() methods.

From: Aleksei Valikov <valikov_at_gmx.net>
Date: Wed, 24 Aug 2011 09:00:19 +0200

Hi,

try versions 0.6.2/0.8.0. Here's a sample project which is know to work:

http://repository.highsource.org/maven2/releases/org/jvnet/jaxb2_commons/jaxb2-basics-sample-basic/0.6.2/

Bye,
/lexi

On Tue, Aug 23, 2011 at 10:10 PM, <cougar_at_casadelgato.com> wrote:
> When I try to use the Jaxb2 Basics plugin to generate toString(),
> hashCode(), and equals() with the following pom segment, i get this
> error:
> ==
> [INFO] Error while setting CmdLine <args> options '[-Xequals,
> -XhashCode, -XtoString, -episode, /home/john....]'!
>
> Embedded error: unrecognized parameter -Xequals
> ==
>
> Any suggestions on what i'm doing wrong?  I thought I had followed the
> directions to use this.
>
>  <build>
>    <plugins>
>      <plugin>
>        <artifactId>maven-compiler-plugin</artifactId>
>        <configuration>
>          <source>1.5</source>
>          <target>1.5</target>
>        </configuration>
>      </plugin>
>      <plugin>
>        <groupId>org.jvnet.jaxb2.maven2</groupId>
>        <artifactId>maven-jaxb2-plugin</artifactId>
>        <version>0.6.1</version>
>        <executions>
>          <execution>
>            <goals>
>              <goal>generate</goal>
>            </goals>
>            <configuration>
>              <catalog>src/main/resources/consumerCatalog.cat</catalog>
>
> <catalogResolver>org.jvnet.jaxb2.maven2.resolver.tools.ClasspathCatalog
> Resolver</catalogResolver>
>              <episodes>
>              </episodes>
>              <extension>true</extension>
>            </configuration>
>          </execution>
>        </executions>
>        <configuration>
>          <extension>true</extension>
>          <args>
>            <arg>-Xequals</arg>
>            <arg>-XhashCode</arg>
>            <arg>-XtoString</arg>
>          </args>
>          <plugins>
>            <plugin>
>              <groupId>org.jvnet.jaxb2_commons</groupId>
>              <artifactId>jaxb2-basics</artifactId>
>              <version>0.5.3</version>
>            </plugin>
>          </plugins>
>        </configuration>
>      </plugin>
>    </plugins>
>  </build>
>