users@jaxb.java.net

RE: Maven 2 Jaxb2 plugin available.

From: Jonathan Johnson <jonjohnson_at_mail.com>
Date: Thu, 13 Apr 2006 21:15:29 -0400

Many thanks Bill !!

I did not test a scenario where the "generatedPackage" was left undefined
(null). Your example configuration was helpful. Its now corrected. I
updated the zip file at

https://jaxb.dev.java.net/jaxb-maven2-plugin/

Please let me know you make out.

Cheers!

- Jonathan


-----Original Message-----
From: William Simons [mailto:william.simons_at_childrens.harvard.edu]
Sent: Thursday, April 13, 2006 10:09 AM
To: users_at_jaxb.dev.java.net
Subject: Re: Maven 2 Jaxb2 plugin available.

Hi Jonathan,

I just tried this out and got a NullPointerException:

java.lang.NullPointerException
        at com.sun.tools.xjc.maven2.XJCMojo.execute(XJCMojo.java:272)
        at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManage
r.java:412)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLife
cycleExecutor.java:534)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle
(DefaultLifecycleExecutor.java:475)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifec
ycleExecutor.java:454)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFail
ures(DefaultLifecycleExecutor.java:306)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(Defa
ultLifecycleExecutor.java:273)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycle
Executor.java:140)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
        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)


Here is my plugin configuration:

            <plugin>
                <groupId>com.sun.tools.xjc.maven2</groupId>
                <artifactId>maven-jaxb-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <extension>true</extension>
                    <catalog>src/main/resources/catalog.cat</catalog>
                </configuration>
            </plugin>


Note that the previous version of the plugin that you sent me worked fine.



On 4/12/06 9:47 PM, "Jonathan Johnson" <jonjohnson_at_mail.com> wrote:
To All Maven 2 and JAXB / xjc users:

A Maven 2 Jaxb2 plugin is available for everyone. Instructions for
downloading and usage are found here:

https://jaxb.dev.java.net/jaxb-maven2-plugin/

Comments and feedback are welcome of course.

Thanks to William Simons and Kohsuke Kawaguchi for pointing out these
problems that have been fixed.

- Removed excessive compiler output.
- xjc now only regenerates when binding, schema or pom.xml file are updated.