Malachi and Kohsuke,
Malachi - Thanks for contributing to this discussion, your experience is
needed! Yes, please do contribute to the code, its design and its user
interface. Its currently not too complex because it relies on the XJC2Task.
I looked at calling both Driver and XJC2Task.
It appeared the XJC2Task had a simpler interface. Also, we are considering
using the ant xjc configuration xml block. I was also concerned that
Kohsuke had logic in there that was not in Driver that the Maven plugin
would need as well. It appeared Driver was the common interface point for a
plugin such as this and I have no problem using that instead. It would
remove the ant dependency from the maven plugin which would be nice. I'm
just concerned about loosing functionality and complicating the plugin code
and ensuring future updates are not too painful.
<plugin>
<groupId>com.sun.tools.xjc.maven2 </groupId>
<artifactId>maven-jaxb-plugin</artifactId>
<executions>...</executions>
<configuration>
<xjc ant task definition here />
</configuration>
> ... instead of defining its own syntax for the maven plugin. I plan to
> look at the code to see how hard it is to do this, and hopefully I
> should be able to submit a patch for a consideration of Jonathan.
The configuration instructions I sent in my announcement email are not
written in stone. They are a starting point for us to decide on the best
configuration interface. Using the ant xjc configuration is not out of the
question and there are definite merits. Two technical roadblocks are 1)
Maven does not make it obvious on how to get the raw configuration block.
(Their documentation just talks about mapped configuration to the plugin
java objects, but I'm sure there is a way) 2) XJC2Task does not have a
method to submit the xml configuration section.
> I think that idea works well for those of us who have used Ant in the
past...
> but for users that are new to Maven2, they are likely not to learn Ant
syntax
> at all. I know my current build doesn't use any Ant syntax at all. We
should try to
> keep those users in mind.
>> Those people still have to learn some syntax, so as long as we position
>> the documentation correctly, I don't think it's any harder for any of our
users.
You guys know the configuration better than me. If its not more complex
that what is on
http://java.sun.com/webservices/docs/1.6/jaxb/ant.html then
why not use the ant syntax. I used this document to create the current
configuration settings. Are the current settings significantly different
than the ant ones? Did I miss any features? Kohsuke did have a good point
that if the configuration block was just passed through to XJC2Task then
future features would be automatically added. I'm flexible.
> Do you have access to the www/ portion of the JAXB project? If you need it
to host your documentation, let me know.
Yes if you would like me to contribute to the www documentation for this go
ahead and set me up.
> 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.
> Also, I wonder if it's possible for us to define an m2 repository on
java.net so that jaxb-impl can specify a transitive dependency to jaxb api
and etc.
That would be nice to put things here
https://maven-repository.dev.java.net/nonav/repository/. Reducing the
amount of required dependencies is important. I believe all that has to be
done is adding these to the poms on the repository. I noticed the poms are
not in the java.net repository. I also noticed that the instructions on
https://maven-repository.dev.java.net/ are for maven 1, not maven 2.
Perhaps there is some java.net maven 2 prerequisite work to fulfill this
transitive dependency goal.
> Also, we should think about how to upload your plugin to the maven
repository.
Once we get a stable version with concise instructions lets publish it there
too.