Maven Plugins - Which is best?

View: New views
9 Messages — Rating Filter:   Alert me  

Maven Plugins - Which is best?

by Joshua Smith-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Maven Users-

There are 3 Maven plugins listed on the main JAXB web page. Can anyone describe the differences or make any recommendations about which one is the best to use? I'm mainly interested in schema generation.

Thanks,
Joshua Smith

JAXB Main Page
https://jaxb.dev.java.net/

JAXB XJC Maven 2 Plugin
https://jaxb.dev.java.net/jaxb-maven2-plugin/

Maven-JAXB-Schemagen
https://jaxb.dev.java.net/maven-jaxb-schemagen/

Maven JAXB2 Plugin
https://maven-jaxb2-plugin.dev.java.net/

Re: Maven Plugins - Which is best?

by Malachi de Ælfweald :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

This is my entire configuration in my pom.xml. It finds the XSDs anywhere in my heirarchy.

            <plugin>
                <groupId>org.jvnet.jaxb2.maven2</groupId>
                <artifactId>maven-jaxb2-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <!-- https://maven-jaxb2-plugin.dev.java.net/nonav/maven-jaxb2-plugin-project/maven-jaxb2-plugin/generate-mojo.html -->
                    <extension>true</extension>
                    <schemaIncludes>
                        <schemaInclude>**/*.xsd</schemaInclude>
                    </schemaIncludes>
                    <strict>false</strict>
                </configuration>
            </plugin>


On Tue, Jul 8, 2008 at 1:59 PM, Joshua Smith <josh@...> wrote:
Maven Users-

There are 3 Maven plugins listed on the main JAXB web page. Can anyone describe the differences or make any recommendations about which one is the best to use? I'm mainly interested in schema generation.

Thanks,
Joshua Smith

JAXB Main Page
https://jaxb.dev.java.net/

JAXB XJC Maven 2 Plugin
https://jaxb.dev.java.net/jaxb-maven2-plugin/

Maven-JAXB-Schemagen
https://jaxb.dev.java.net/maven-jaxb-schemagen/

Maven JAXB2 Plugin
https://maven-jaxb2-plugin.dev.java.net/


Re: Maven Plugins - Which is best?

by Aleksei Valikov :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi.

> There are 3 Maven plugins listed on the main JAXB web page. Can anyone
> describe the differences or make any recommendations about which one is the
> best to use? I'm mainly interested in schema generation.
>

Actually the choice is between this one:

> JAXB XJC Maven 2 Plugin
> https://jaxb.dev.java.net/jaxb-maven2-plugin/

And this one:

> Maven JAXB2 Plugin
> https://maven-jaxb2-plugin.dev.java.net/

Because this one:

> Maven-JAXB-Schemagen
> https://jaxb.dev.java.net/maven-jaxb-schemagen/

Is a schemagen plugin, it generates schema from classes, not classes
from schema.

Concerning the org.jvnet.jaxb2.maven2:maven-jaxb2-plugin versus
com.sun.tools.xjc.maven2:maven-jaxb-plugin, from my point of view it's
definitely the first one (https://maven-jaxb2-plugin.dev.java.net/).
This plugin has much more features than
com.sun.tools.xjc.maven2:maven-jaxb-plugin, the development is active.
Finally, I'm one of the authors :) and I'd say we keep in touch with
JAXB developers and users and react to the latests features/requests.

So the choice is:
https://maven-jaxb2-plugin.dev.java.net/

Bye.
/lexi

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Maven Plugins - Which is best?

by Joshua Smith-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Lexi-

Thanks for the information.

We're doing schema generation from annotated Java classes. Is your plugin still the correct choice or is the schema generation plugin?

Thanks,
Josh

On Wed, Jul 9, 2008 at 2:16 AM, Aleksei Valikov <valikov@...> wrote:
Hi.

> There are 3 Maven plugins listed on the main JAXB web page. Can anyone
> describe the differences or make any recommendations about which one is the
> best to use? I'm mainly interested in schema generation.
>

Actually the choice is between this one:

> JAXB XJC Maven 2 Plugin
> https://jaxb.dev.java.net/jaxb-maven2-plugin/

And this one:
Because this one:
Is a schemagen plugin, it generates schema from classes, not classes
from schema.

Concerning the org.jvnet.jaxb2.maven2:maven-jaxb2-plugin versus
com.sun.tools.xjc.maven2:maven-jaxb-plugin, from my point of view it's
definitely the first one (https://maven-jaxb2-plugin.dev.java.net/).
This plugin has much more features than
com.sun.tools.xjc.maven2:maven-jaxb-plugin, the development is active.
Finally, I'm one of the authors :) and I'd say we keep in touch with
JAXB developers and users and react to the latests features/requests.

So the choice is:
Bye.
/lexi

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...



Re: Maven Plugins - Which is best?

by Joshua Smith-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thank you Malachi.

On Tue, Jul 8, 2008 at 5:50 PM, Malachi de Ælfweald <malachid@...> wrote:
This is my entire configuration in my pom.xml. It finds the XSDs anywhere in my heirarchy.

            <plugin>
                <groupId>org.jvnet.jaxb2.maven2</groupId>
                <artifactId>maven-jaxb2-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <!-- https://maven-jaxb2-plugin.dev.java.net/nonav/maven-jaxb2-plugin-project/maven-jaxb2-plugin/generate-mojo.html -->
                    <extension>true</extension>
                    <schemaIncludes>
                        <schemaInclude>**/*.xsd</schemaInclude>
                    </schemaIncludes>
                    <strict>false</strict>
                </configuration>
            </plugin>



On Tue, Jul 8, 2008 at 1:59 PM, Joshua Smith <josh@...> wrote:
Maven Users-

There are 3 Maven plugins listed on the main JAXB web page. Can anyone describe the differences or make any recommendations about which one is the best to use? I'm mainly interested in schema generation.

Thanks,
Joshua Smith

JAXB Main Page
https://jaxb.dev.java.net/

JAXB XJC Maven 2 Plugin
https://jaxb.dev.java.net/jaxb-maven2-plugin/

Maven-JAXB-Schemagen
https://jaxb.dev.java.net/maven-jaxb-schemagen/

Maven JAXB2 Plugin
https://maven-jaxb2-plugin.dev.java.net/



Re: Maven Plugins - Which is best?

by Aleksei Valikov :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi.

> Thanks for the information.
>
> We're doing schema generation from annotated Java classes. Is your plugin
> still the correct choice or is the schema generation plugin?

It's the schemagen plugin then.

maven-jaxb2-plugin is only for schema-to-java.

Bye.
/lexi

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Maven Plugins - Which is best?

by Joshua Smith-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thank you.

Josh

On Wed, Jul 9, 2008 at 9:41 AM, Aleksei Valikov <valikov@...> wrote:
Hi.

> Thanks for the information.
>
> We're doing schema generation from annotated Java classes. Is your plugin
> still the correct choice or is the schema generation plugin?

It's the schemagen plugin then.

maven-jaxb2-plugin is only for schema-to-java.

Bye.
/lexi

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...



Re: Maven Plugins - Which is best?

by Joshua Smith-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Does anyone have some snippets from their POM that use the schemagen plugin that they could post? The web site doesn't seem to have any examples.

Thanks,
Josh

On Wed, Jul 9, 2008 at 10:23 AM, Joshua Smith <josh@...> wrote:
Thank you.

Josh


On Wed, Jul 9, 2008 at 9:41 AM, Aleksei Valikov <valikov@...> wrote:
Hi.

> Thanks for the information.
>
> We're doing schema generation from annotated Java classes. Is your plugin
> still the correct choice or is the schema generation plugin?

It's the schemagen plugin then.

maven-jaxb2-plugin is only for schema-to-java.

Bye.
/lexi

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...




Re: Maven Plugins - Which is best?

by jlim :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Josh,

Here's an example used in the Apache Camel project :


      <plugin>
        <groupId>com.sun.tools.jxc.maven2</groupId>
        <artifactId>maven-jaxb-schemagen-plugin</artifactId>
        <version>1.3-snapshot</version>
        <executions>
          <execution>
            <phase>process-sources</phase>
            <configuration>
              <destdir>${project.build.directory}/schema</destdir>
              <srcdir>${project.build.directory}/schema-src</srcdir>
              <schemas>
                <schema>
                  <namespace>http://activemq.apache.org/camel/schema/spring</namespace>
                  <file>camel-spring.xsd</file>
                </schema>
              </schemas>
              <!--<verbose>false</verbose>-->
            </configuration>
            <goals>
              <goal>generate</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

Regards,
Jonas


Joshua Smith-5 wrote:
Does anyone have some snippets from their POM that use the schemagen plugin
that they could post? The web site doesn't seem to have any examples.

Thanks,
Josh

On Wed, Jul 9, 2008 at 10:23 AM, Joshua Smith <josh@rationalpi.com> wrote:

> Thank you.
>
> Josh
>
>
> On Wed, Jul 9, 2008 at 9:41 AM, Aleksei Valikov <valikov@gmx.net> wrote:
>
>> Hi.
>>
>> > Thanks for the information.
>> >
>> > We're doing schema generation from annotated Java classes. Is your
>> plugin
>> > still the correct choice or is the schema generation plugin?
>>
>> It's the schemagen plugin then.
>>
>> maven-jaxb2-plugin is only for schema-to-java.
>>
>> Bye.
>> /lexi
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@jaxb.dev.java.net
>> For additional commands, e-mail: users-help@jaxb.dev.java.net
>>
>>
>
LightInTheBox - Buy quality products at wholesale price!