Hi Abhinav ,

You should use the latest plugin, hosted at java.net:

groupId:        org.jvnet.jaxb2.maven2
artifactId:     maven-jaxb2-plugin


Regards,
  Kostis

On Thu 20 Sep 2007 14:49:08 Abhinav Chaturvedi wrote:
> Hi,
>
> I am trying to use commons lang plugin, supplied with jaxb2-commons, but I
> fail to get the hashCode for the generated types. While passing the
> parameter -Xcommons-lang I get an unrecognized parameter exception in
> XJCMojo class.
>
> Also, I cannot use any other plugins (other than commons-lang) to generate
> hashCode for backward compatibility.
>
> This is how my pom.xml looks like
> --------------------
> <plugin>
> <artifactId>jaxb2-maven-plugin </artifactId>
> <groupId>org.codehaus.mojo</groupId>
> <dependencies>
> <dependency>
> <groupId>net.java.dev.jaxb2-commons</groupId>
> <artifactId>jaxb-commons-lang-plugin</artifactId>
> <version>2.0.2</version>
> </dependency>
> </dependencies>
> <configuration>
> <packageName> foo.bar</packageName>
> <!-- The name of your generated source package -->
> <schemaDirectory>./src/main/wsdl/</schemaDirectory>
> <schemaFiles> blah.xsd</schemaFiles>
> <arguments>-Xcommons-lang</arguments>
> </configuration>
> <executions>
> <execution>
> <goals>
> <goal>xjc</goal>
> </goals>
> </execution>
> </executions>
> </plugin>
> -------------------------
> While compiling (mvn clean compile) I get following exception-
>
> [DEBUG] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: unrecognized
> parameter -Xcommons-lang
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
> DefaultLifecycleExecutor.java:564)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycl
>e (DefaultLifecycleExecutor.java :480)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
> DefaultLifecycleExecutor.java:459)
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFai
>lures (DefaultLifecycleExecutor.java :311)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
> DefaultLifecycleExecutor.java:278)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
> DefaultLifecycleExecutor.java :143)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java :280)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java
>
> :39)
>
> at sun.reflect.DelegatingMethodAccessorImpl.invoke (
> DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
> at org.codehaus.classworlds.Launcher.launch (Launcher.java:255)
> at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
> at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.maven.plugin.MojoExecutionException : unrecognized
> parameter -Xcommons-lang
> at org.codehaus.mojo.jaxb2.XjcMojo.execute(XjcMojo.java:352)
> at org.apache.maven.plugin.DefaultPluginManager.executeMojo(
> DefaultPluginManager.java:443)
> at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
> DefaultLifecycleExecutor.java:539)
> ... 16 more
> Caused by: com.sun.tools.xjc.BadCommandLineException: unrecognized
> parameter -Xcommons-lang
> at com.sun.tools.xjc.Options.parseArguments(Options.java:692)
> at com.sun.tools.xjc.Driver.run(Driver.java:209)
> at org.codehaus.mojo.jaxb2.XjcMojo.execute(XjcMojo.java:301)
>
> Where am I going wrong?
>
> Would really appreciate any help.
>
> Thanks in advance.
>
> Abhinav



---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to