users@jaxb.java.net

RE: Maven 2 Jaxb2 plugin available.

From: Simons, William <William.Simons_at_childrens.harvard.edu>
Date: Fri, 14 Apr 2006 09:51:57 -0400

Works like a charm!
 
It looks like I get these two lines for each schema that its compiling:
[INFO] Compiling file:/Users/bsimons/projects/svn/ping/server/phr-xml/src/main/r
esources/actions.xsd and others
[INFO] Writing output to /Users/bsimons/projects/svn/ping/server/phr-xml/target/
generated-sources/xjc
 
Is that expected?
 
Great work My project couldn't proceed without it.
 
Bill

________________________________

From: Jonathan Johnson [mailto:jonjohnson_at_mail.com]
Sent: Thu 4/13/2006 9:15 PM
To: users_at_jaxb.dev.java.net
Subject: RE: Maven 2 Jaxb2 plugin available.


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(DefaultPluginManager.java:412)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:534)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:475)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:454)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:306)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:273)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.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.