users@jaxb.java.net

Re: JAXB compilation plugin

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Wed, 01 Mar 2006 16:44:14 -0800

Malachi de Ælfweald wrote:
> If we wanted to go that approach, we would probably just do it as an Ant
> MOJO instead of a Java MOJO. I didn't do that on mine because I am much more
> comfortable manipulating the File and URL objects in Java :) Ant MOJO docs
> can be found at
> http://maven.apache.org/guides/plugin/guide-ant-plugin-development.html as
> opposed to the Java MOJO docs at
> http://maven.apache.org/guides/plugin/guide-java-plugin-development.html

Interesting. I didn't know about Ant MOJO. The problem I see with it is
that you can only take simple one-value parameters as Ant properties,
whereas we want to take structure (like a fileset for binding files.)

So I don't know if Ant MOJO can be made to work.


>> > Do people need to specify jaxb-xjc as the dependency? I thought only the
>> plugin depends on jaxb-xjc and not user app.
>> This is why I don't quit my day job. You are correct the only the plugin
>> depends on jaxb-xjc. I will reflect this in the documentation.
>>
>
> if the plugin specifies all 3 as dependencies, and the user's build lists
> the plugin as a dependency (because they are generating sources, right?),
> then it should auto-find all 3 jaxb dependencies when the tool is used.

Ah, right. Yes, I was confused. This is a list of dependencies that this
plugin has, and it's not a dependency a plugin user would have to have.

> The directory layout is different... I tried using the
> maven-repository.dev.java.net with the legacy repository setting, but it was
> constantly failing... I copied the jars locally and added the
> maven-metadata.xml and the jaxb-WHICHJAR-WHICHVERSION.pom
> so, my local repository, the path is something like:
> <dir>\repository\maven2\jaxb\jaxb-impl\20051223\jaxb-impl-20051223.jar
>
> as a side note, I had to take the "1.0/" subdirectory out of the xjc jar in
> order to get IntelliJ to quit finding the wrong versions of classes....
> maven was OK, but the editor was not.

If you can join the maven-javanet-plugin project and help us with the m2
plugin, that would be great, Malachi. Seems like you have a lot of
experience in the area.


> Should we be taking this discussion off the list?

I think we can keep it here. In the past other people had chimed in to
share their thoughts, and that has been helpful. A case in point, if we
didn't have this discussion here, you wouldn't have noticed that
Jonathan is working on this.

-- 
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com