You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jaxme-dev@ws.apache.org by Jochen Wiedmann <jo...@gmail.com> on 2006/11/02 23:16:22 UTC

Version 2 of the maven-jaxme-plugin

Hi,

I'd like to ask the users of the maven-jaxme-plugin for feedback on
the proposed version 2. The updated version is available from the
Maven snapshot repository on people.apache.org:

    http://people.apache.org/repo/m2-snapshot-repository/org/apache/ws/jaxme

This version is slightly incompatible to its predecessor (hence the
increment in the major version number). If noone else intervenes, I'll
ask for a release in the next weeks.

Thanks,

Jochen

List of changes in the plugin:

  - Added the concept of schema collections, which allows to compile
    multiple schema files within one project using different
    configurations. You had to use subprojects before.
  - Upgrade to JaxMe 0.5.2.
  - File sets are now built using the Plexus utilities, which is the
    standard for Maven plugins. Unfortunately, this means that the
    syntax for configuring the plugin has changed.
  - Added support for entity resolvers.
  - The input files may now be added to the generated jar file, so that
    they can be used for documentation or validation.
  - Sources and resources may now have different target directories,
    which matches the Maven standards.


-- 
My wife Mary and I have been married for forty-seven years and not
once have we had an argument serious enough to consider divorce;
murder, yes, but divorce, never.
(Jack Benny)

---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org


Re: Version 2 of the maven-jaxme-plugin

Posted by Jochen Wiedmann <jo...@gmail.com>.
On 11/3/06, Kenney Westerhof <ke...@apache.org> wrote:

> (Too bad it's not as advanced as the Sun implementation: no Java 5 annotations (maybe jaxme is just
> an implementation for jaxb 1?

Exactly. That's what makes most of the differences you've noted.


> Nevertheless, there's a future here ;)

I wish I could agree. :-(


> 1) (important) the scm urls in the POM don't match the repository location:

Thanks, fixed!


>    The @parameter should be defined as
>
>            @parameter expression="${forceCreation}" devault-value="false"

Done. I have choosen ${jaxme.forceCreation}, following the jar plugin.


>    generated resources go in target/generated-resources/SHORT_PLUGIN_NAME, in this case target/generated-resources/jaxme/

Ok.


> 4) The 'addPluginArtifacts' method adds the jaxme2-rt artifact to the MavenProject object if it is not specified as a dependency.
>    While this works when compiling the project, this new artifact is not persisted in the pom and users of
>    the project will receive errors due to the missing library. It's best not to do this; you could warn
>    when you can't find it, but this approach is potentially dangerous.

I agree. My initial impression was, that projects would inherit this
runtime setting, but the declaration in the POM is required anyways.



> Two offtopic comments:
>
> I've tried to get the maven-jaxme-plugin trunk to build with trunk, and I noticed
> that two things are missing in the new jaxme-xs:
> 1) no way to set bindings (Generator.addBindings() method is gone)
> 2) no way to set the resource output directory (Generator.setResourceTargetDirectory() is gone)

That's serious. It means, that these haven't been ported forward. :-(



> And did you get a chance to look at JAXME-87?

Not before I haven't documented the axis2-java2wsdl-maven-plugin.
That's the next on my list of larger topics.


Sorry, and thanks for your very valuable input,

Jochen


-- 
My wife Mary and I have been married for forty-seven years and not
once have we had an argument serious enough to consider divorce;
murder, yes, but divorce, never.
(Jack Benny)

---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org


Re: Version 2 of the maven-jaxme-plugin

Posted by Kenney Westerhof <ke...@apache.org>.
Hi,

Works great, I've been running it over the last week. 

(Too bad it's not as advanced as the Sun implementation: no Java 5 annotations (maybe jaxme is just
an implementation for jaxb 1? - couldn't find it), no plugins, totally different generated sources approach
which makes it not compatible with the Sun generated classes (they're POJOs, Jaxme generates interfaces..)).
Nevertheless, there's a future here ;)

A few comments on some things I noticed about the plugin:

1) (important) the scm urls in the POM don't match the repository location:

  <connection>scm:svn:http://svn.apache.org/repos/asf/webservices/jaxme/trunk/maven-jaxme-plugin/</connection>

  should be 

  <connection>scm:svn:http://svn.apache.org/repos/asf/webservices/jaxme/trunk/ws-jaxme/maven-jaxme-plugin/</connection>

  (or ws-jaxme/maven-jaxme-plugin/ moved 1 level up).

  Same for <developerConnection> and <url>.

2) (recommendation) Use 'default-value' instead of 'expression' for mojo parameter annotations, for instance:

	/** Setting this property to suppresses the builtin
	 * uptodate check.
	 * @parameter expression="false"
	 */
	private boolean forceCreation;

   The @parameter should be defined as

           @parameter expression="${forceCreation}" devault-value="false"

   which means that you can both configure it in the pom as <configuration><forceCreation>true</.. 
   and on the commandline with -DforceCreation=true. Or leave the expression=".." out; then you won't
   be able to specify it on the commandline.

   (minor naming issue: removingOldOutput -> removeOldOutput)

3) (suggestion) Maven 2 Conventions: 
   generated sources go in target/generated-sources/SHORT_PLUGIN_NAME, in this case target/generated-sources/jaxme/
   generated resources go in target/generated-resources/SHORT_PLUGIN_NAME, in this case target/generated-resources/jaxme/

   so like here:

	/** The target directory for resource files. Defaults to
	 * @parameter expression="${project.build.directory}/generated-sources/jaxme/resources"
	 */
	private String resourceTarget;  

         (dubious name: resourceTarget; an even more dubious name is 'srcTarget' ;)

   use

      @parameter expression="${project.build.directory}/generated-resources/jaxme"

4) The 'addPluginArtifacts' method adds the jaxme2-rt artifact to the MavenProject object if it is not specified as a dependency.
   While this works when compiling the project, this new artifact is not persisted in the pom and users of
   the project will receive errors due to the missing library. It's best not to do this; you could warn
   when you can't find it, but this approach is potentially dangerous.

Two offtopic comments:

I've tried to get the maven-jaxme-plugin trunk to build with trunk, and I noticed
that two things are missing in the new jaxme-xs:
1) no way to set bindings (Generator.addBindings() method is gone)
2) no way to set the resource output directory (Generator.setResourceTargetDirectory() is gone)

And did you get a chance to look at JAXME-87?

-- Kenney
  

Jochen Wiedmann wrote:
> Hi,
> 
> I'd like to ask the users of the maven-jaxme-plugin for feedback on
> the proposed version 2. The updated version is available from the
> Maven snapshot repository on people.apache.org:
> 
>    http://people.apache.org/repo/m2-snapshot-repository/org/apache/ws/jaxme
> 
> This version is slightly incompatible to its predecessor (hence the
> increment in the major version number). If noone else intervenes, I'll
> ask for a release in the next weeks.
> 
> Thanks,
> 
> Jochen
> 
> List of changes in the plugin:
> 
>  - Added the concept of schema collections, which allows to compile
>    multiple schema files within one project using different
>    configurations. You had to use subprojects before.
>  - Upgrade to JaxMe 0.5.2.
>  - File sets are now built using the Plexus utilities, which is the
>    standard for Maven plugins. Unfortunately, this means that the
>    syntax for configuring the plugin has changed.
>  - Added support for entity resolvers.
>  - The input files may now be added to the generated jar file, so that
>    they can be used for documentation or validation.
>  - Sources and resources may now have different target directories,
>    which matches the Maven standards.
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org