users@jaxb.java.net

RE: Maven 2 Jaxb2 plugin available.

From: Jonathan Johnson <jonjohnson_at_mail.com>
Date: Wed, 19 Apr 2006 20:00:33 -0400

Thanks for this update. I will assume your configuration is the same as you
previously described. I will look at this soon. Let me know if you see any
other problems.

-----Original Message-----
From: William Simons [mailto:william.simons_at_childrens.harvard.edu]
Sent: Tuesday, April 18, 2006 2:24 PM
To: users_at_jaxb.dev.java.net
Subject: Re: Maven 2 Jaxb2 plugin available.

Hi Jon,

Thanks again for all your hard work.

I noticed today that my schemas are still compiled every time that I run
install even if they haven’t changed. Did the depends/produces fix make it
into the release? Sorry I didn’t report on this before.

Bill


On 4/14/06 10:32 AM, "Jonathan Johnson" <jonjohnson_at_mail.com> wrote:
Excellent. Sounds like its ready for publication. I will work on getting
the plugin onto Maven 2 Ibiblio. I’ll bump the version 1.1

All of the log messages in the plugin are wrapped in isVerbose checks. Lots
of information comes out if you set verbose=true. The messages you are
seeing “Compiling file..” and “Writing output to..” seem to be the standard
non-verbose output of the xjc compiler.


-----Original Message-----
From: Simons, William [ mailto:William.Simons_at_childrens.harvard.edu]
<mailto:William.Simons_at_childrens.harvard.edu%5D>
Sent: Friday, April 14, 2006 9:52 AM
To: users_at_jaxb.dev.java.net
Subject: RE: Maven 2 Jaxb2 plugin available.

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]
<mailto:jonjohnson_at_mail.com%5D>
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]
<mailto:william.simons_at_childrens.harvard.edu%5D>
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.