Kohsuke Kawaguchi wrote:
> I started investigating how Maven is injecting properties into a Mojo
> object. Looks like the data is coming from PlexusConfiguration object,
> which more or less look like an infoset. I'll dig deeper tomorrow.
I figured out how to do this. I can now have the user write:
<configuration>
<!-- mostly the same syntax as Ant -->
<xjc package="org.foo.bar">
<schema dir="src/main/schemas" includes="**/*.xsd" />
</xjc>
<!--
if you need multiple compilations
you can specify them separately as <xjc> elements.
-->
</configuration>
and have this populate an XJC2Task object, in such a way that doesn't
depend on the concrete syntax.
We can then refactor XJC2Task a bit so that it can easily accommodate
default values specific to Maven --- such as the output directory,
default schema base directory, etc.
This is all technically possible. It's just a matter of connecting all dots.
That said, It seems like both Jonathan and Malachi are hesitant to use
this syntax. For example, Malachi says:
> I agree with Kohsuke that some of the users will already have ant build
> files, and that for them it will be easier to use that format... However, I
> agree with you that as a Maven2 project it seems like Maven2 style is most
> appropriate. I'd personally rather not use any Ant syntax in my build -- I
> switched to maven for a reason :)
So I'd like to better understand which aspect of the above syntax is so
"Ant-like" that Maven folks won't like it.
--
Kohsuke Kawaguchi
Sun Microsystems kohsuke.kawaguchi_at_sun.com