users@jaxb.java.net

Re: unrecognized parameter -Xboolean-getter (JAXB2 commons)

From: Aleksei Valikov <valikov_at_gmx.net>
Date: Tue, 14 Aug 2007 10:37:57 +0200

Hi.

Your plugin artifact must be in plugin's dependencies.

Here's an example:

                <plugins>
                        <plugin>
                                <groupId>org.jvnet.jaxb2.maven2</groupId>
                                <artifactId>maven-jaxb2-plugin</artifactId>
                                <dependencies>
                                        <dependency>
                                                <groupId>org.jvnet.jaxb2_commons</groupId>
                                                <artifactId>basic</artifactId>
                                                <version>${pom.version}</version>
                                        </dependency>
                                </dependencies>
                                <configuration>
                                        <args>
                                                <arg>-XtoString</arg>
                                                <arg>-Xequals</arg>
                                                <arg>-XhashCode</arg>
                                                <arg>-Xcopyable</arg>
                                        </args>
                                </configuration>
                        </plugin>
                </plugins>


Bye.
/lexi

On 8/14/07, Hadjistratis, Manolis <m.hadjistratis_at_decision.quest.gr> wrote:
>
>
>
>
> Hi, I need some help. I want to use the plug-in boolean-getter but I
> received an error when Irun my pom.xml with maven 2.
>
> The trace:
>
> ….
>
> [INFO] XJC compile
>
> [INFO] build id of XJC is 2.0.2-b01-fcs
>
> [INFO] failure in the XJC task. Use the Ant -verbose switch for more details
>
> [INFO]
> ------------------------------------------------------------------------
>
> [ERROR] FATAL ERROR
>
> [INFO]
> ------------------------------------------------------------------------
>
> [INFO] unrecognized parameter -Xboolean-getter
>
> [INFO]
> ------------------------------------------------------------------------
>
> [INFO] Trace
>
> unrecognized parameter -Xboolean-getter
>
> at
> com.sun.tools.xjc.XJC2Task._doXJC(XJC2Task.java:409)
>
> at
> com.sun.tools.xjc.XJC2Task.doXJC(XJC2Task.java:397)
>
> at
> com.sun.tools.xjc.XJC2Task.execute(XJC2Task.java:332)
>
> at
> com.sun.tools.xjc.maven2.XJCMojo.execute(XJCMojo.java:310)
>
> at
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:420)
>
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
>
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)
>
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459)
>
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:3
>
> 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:330)
>
> at
> org.apache.maven.DefaultMaven.execute(DefaultMaven.java:123)
>
> at
> org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
>
> 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:597)
>
> 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: com.sun.tools.xjc.BadCommandLineException:
> unrecognized parameter -Xboolean-getter
>
> at
> com.sun.tools.xjc.Options.parseArguments(Options.java:664)
>
> at
> com.sun.tools.xjc.XJC2Task._doXJC(XJC2Task.java:407)
>
> ... 21 more
>
> --- Nested Exception ---
>
> com.sun.tools.xjc.BadCommandLineException: unrecognized
> parameter -Xboolean-getter
>
> at
> com.sun.tools.xjc.Options.parseArguments(Options.java:664)
>
> at
> com.sun.tools.xjc.XJC2Task._doXJC(XJC2Task.java:407)
>
> at
> com.sun.tools.xjc.XJC2Task.doXJC(XJC2Task.java:397)
>
> at
> com.sun.tools.xjc.XJC2Task.execute(XJC2Task.java:332)
>
> at
> com.sun.tools.xjc.maven2.XJCMojo.execute(XJCMojo.java:310)
>
> at
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:420)
>
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
>
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)
>
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459)
>
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:3
>
> 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:330)
>
> at
> org.apache.maven.DefaultMaven.execute(DefaultMaven.java:123)
>
> at
> org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
>
> 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:597)
>
> 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)
>
> [INFO]
> ------------------------------------------------------------------------
>
> [INFO] Total time: 13 seconds
>
> [INFO] Finished at: Tue Aug 14 10:11:48 EEST 2007
>
> [INFO] Final Memory: 10M/19M
>
> [INFO]
> ------------------------------------------------------------------------
>
>
>
> And there is an extract of my pom:
>
> <plugin>
>
> <groupId>com.sun.tools.xjc.maven2</groupId>
>
> <artifactId>maven-jaxb-plugin</artifactId>
>
> <executions>
>
> <execution>
>
> <id>book</id>
>
> <goals>
>
> <goal>generate</goal>
>
> </goals>
>
> </execution>
>
> </executions>
>
> <configuration>
>
> <args>-Xboolean-getter</args>
>
> <includeBindings>
>
> <includeBinding>**/allDocuments.xjb</includeBinding>
>
> </includeBindings>
>
> <includeSchemas>
>
> <includeSchema>**/*.xsd</includeSchema>
>
> </includeSchemas>
>
> <schemaDirectory>src/main/resources</schemaDirectory>
>
> <strict>true</strict>
>
> <extension>true</extension>
>
> <verbose>true</verbose>
>
> </configuration>
>
> </plugin>
>
> ….
>
> <dependency>
>
> <groupId>jaxb2_commons</groupId>
>
> <artifactId>booleangetter</artifactId>
>
> <version>1.0</version>
>
> </dependency>
>
>
>
> Thank you.
>
>
>
> HADJISTRATIS EMMANUEL
>
> Software Engineer
>
> DECISION SYSTEMS INTEGRATION SA
> Tel:+30-211-9994427
> E-Mail:m.hadjistratis_at_decision.quest.gr
>
>
> CONFIDENTIALITY & DISCLAIMER NOTICE
>
> Communications on or through Info-Quest computer systems may be monitored or
> recorded to secure effective system operation and for other lawful purposes.
> Unless otherwise agreed expressly in writing by an officer of Info-Quest,
> this communication is to be treated as confidential and the information in
> it may not be used or disclosed except for the purpose for which it has been
> sent. If you have reason to believe that you are not the intended recipient
> of this communication, please contact the sender immediately. No employee or
> agent is authorised to conclude any binding agreement on behalf of
> Info-Quest with another party by e-mail without express written confirmation
> by an officer of Info-Quest. Info-Quest employees are required not to make
> any defamatory statements and not to infringe or authorise any infringement
> of copyright or any other legal right by e-mail communications. Any such
> communication is contrary to organisational policy and outside the scope of
> the employment of the individual concerned. Info-Quest will not accept any
> liability in respect of such a communication, and the employee responsible
> will be personally liable for any damages or other liability arising.
>