Regarding the includeSchemas problem....
After much finagling around with repositories on the plugin pom.xml, I
finally got it to build. Using it, it correctly found the schema
directory... so sounds like the binary download version just needs rebuilt.
Although there does seem to be a discrepency with the verbose flag...
[INFO] verbose: true
[INFO] Schema dependency:
C:\devel\MimirDB\trunk\src\main\resources\org\eoti\spec\mimirdb\mimirdb-
1.0.xsd
[INFO] pom dependency: C:\devel\MimirDB\trunk\pom.xml
[INFO] XJC compile using schema:
C:\devel\MimirDB\trunk\src\main\resources\org\eoti\spec\mimirdb\mimirdb-
1.0.xsd
[INFO] build id of XJC is 2.0-04/28/2006 12:05 AM(kohsuke)-fcs
[INFO] failure in the XJC task. Use the Ant -verbose switch for more details
Secondary problem seems to be that it is not accepting the classpath
provided my maven. IE: When compiling, maven sees my dependency; but when
trying to link in my plugin (via the <args></args>) it isn't in the
classpath (verified with temporary hack to the plugin code). Looking into
it.
Malachi
On 7/25/06, Malachi de Ælfweald <malachid_at_gmail.com> wrote:
>
> Sorry it took so long to reply to this. I haven't had a chance to do any
> development in awhile.
> But, before continuing with the comments, I should point out some changes
> I did today...
> 1. newest mustang release
> 2. newest jaxb release
> 3. newest maven release
> 4. newest subversion, intellij, tortoisesvn, etc
> 5. newest maven-jaxb-plugin from this link on the main page:
> In the meantime you can download the lastest plugin version from this link<https://jaxb.dev.java.net/jaxb-maven2-plugin/maven-jaxb-plugin-1.0.zip>and expand the .zip contents into your local %HOMEPATH%/.m2/repository
> directory.
>
> I've decided to move away from using reactor and making all my modules
> completely seperate projects... As such, some slight changes to the
> pom.xml files,etc... I've also changed my directory layout to match the
> suggested layout per the Maven documentation and per the Maven-JAXB-Plugindocumentation. I'm trying to move to less "modified" configurations.
>
> Ok, onto the comments...
>
> On 5/18/06, Malachi de Ælfweald <malachid_at_gmail.com> wrote:
>
> > On 5/17/06, Jonathan Johnson < jonjohnson_at_mail.com> wrote:
> >
> > > >> 1. it says that " includeSchemas" was not set, but I set it as per
> > > >> instructions (but told it to recurse subdirectories)
> > >
> > > You indeed found a problem (it was missing an important @parameter
> > > tag).
> > > The plugin has been fixed and reposted.
> > > Instructions are here: http://jaxb.dev.java.net/jaxb-maven2-plugin/
> >
> >
> > Kewl. I'll grab the new one.
> >
>
> The new one seems to have the same problem... Specifically, per the
> documentation:
>
> <includeSchemas>
> <includeSchema>**/*.xsd</includeSchema>
> </includeSchemas>
> And the resulting output:
> [INFO] includeSchemas: [*.xsd]
>
> Now to clarify here a second... My schema is:
> C:\devel\MimirDB\trunk\src\main\resources\org\eoti\spec\mimirdb\mimirdb-
> 1.0.xsd
>
> If I move it directly under main\resources, it works... In addition to the
> output not showing "**/", it leads me to think the recursion is not working.
>
>
>
>
> >> 2. instead of running under reactor, it tried to run on the outside
> > > >> pom which has no source code -- and thus hard crashed the build
> > >
> > > I'm not clear on what you are describing here. I'm not sure of the
> > > steps to
> > > follow to reproduce this. Can you provide more details?
> >
> >
> > Instructions are here: http://maven.apache.org/guides/getting-started/index.html#How%20do%20I%20build%20more%20than%20one%20project%20at%20once
> > ?
> >
> > Generally, it follows like this.... the root project directory contains
> > a pom.xml that contains a "<modules>" section. Each module specified a
> > subproject directory, which contains it's own pom.xml
> >
> > In my case specifically, all my build setup is on the outside pom.xml,
> > which has no source code itself. Then each child pom.xml has the very
> > minimal settings (usually, which other subproject it depends on -- in order
> > to allow maven to determine the correct order to build them).
> >
>
> I'm no longer doing this, so that issue is moot.
>
> >> how do I enable an external jaxb plugin
> > >
> > > This was a feature for the next version. I would image a section in
> > > the
> > > configuration section like this...
> > >
> > > <classpaths>
> > > <classpath>/path/to/jaxb-xjc.jar</classpath>
> > > <classpath>/path/to/plugin.jar</classpath>
> > > </classpaths >
> > >
> > > Which in turn would call XJC2Task.setClasspath(...)
> > >
> > > But I'm not sure how to invoke the plugin methods as you can do in an
> > > Ant
> > > command
> > >
> > > <xjc ...>
> > > <arg value="-Xinject-code" />
> > > ... other nested elements ...
> > > </xjc>
> > >
> > > Perhaps you or Kohsuke can advise me.
> > >
> > >
> > > - Jonathan
> >
> >
> > As I see it, there are two primary things we have to do. One, make sure
> > that it is on the classpath (which is counter-intuitive for maven, since
> > we got away from specifying classpaths); Two, to specify the -Xoption to
> > actually get it called...
> >
> > Does the -Xoption require that vendor extensions are turned on?
> > If so, then perhaps we change <extension>true</extension>
> > to
> > <extensions enabled="true">
> > <extension>Xlocator</extension>
> > </extensions>
> >
> > then, we just have to deal with it being on the classpath...
> >
>
> I will be trying the -X <args> once I get the earlier problem fixed to
> actually compile the schema.
>
>
>
>
> Malachi
>
>