users@jaxb.java.net

Re: JAXB compilation plugin

From: Malachi de Ælfweald <malachid_at_gmail.com>
Date: Wed, 1 Mar 2006 21:32:48 -0800

Comments inline

On 3/1/06, Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_sun.com> wrote:
>
> 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.htmlas
> > 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.


Personally, I prefer working with the Java Mojo anyway.

>> > 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.


They don't specifically have to list it, but I think it will still try to
download them when they use the plugin.

> 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.


I couldn't find a link to actually join the project. Looks like the project
page was custom built. Any clue where to find the link?

> 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.


Good point.