Maven Jaxb2 plugin (schemagen) generating classes

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Maven Jaxb2 plugin (schemagen) generating classes

Miguel Garz
Good Morning everyone.
I'm having a problem with my Jaxb2 schemagen plugin for maven.
What happens is that the .xsd files are generated correctly in the output folder.
However within it are generated the .class files as well , polluting my directory.
My question is: how can I tell the maven plugin schemagen to generate only the .xsd files and not the class files?
here is my pom:


<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxb2-maven-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<phase>generate-resources</phase>
<id>schemagen</id>
<goals>
<goal>schemagen</goal>
</goals>
<configuration>
<includes>
<include>com/delagelanden/rijee6/domain/*.java</include>
</includes>
<outputDirectory>${project.build.directory}/schemas</outputDirectory>
<verbose>true</verbose>
</configuration>
</execution>
</executions>
</plugin>


I didn't find any about this in the documentation,
thank you very much,
Miguel Garz
Reply | Threaded
Open this post in threaded view
|

Re: Maven Jaxb2 plugin (schemagen) generating classes

Anders Hammar
So you get .class files in target/schemas?

/Anders


On Wed, May 22, 2013 at 11:31 AM, Miguel Garz <[hidden email]> wrote:
Good Morning everyone.
I'm having a problem with my Jaxb2 schemagen plugin for maven.
What happens is that the .xsd files are generated correctly in the output folder.
However within it are generated the .class files as well , polluting my directory.
My question is: how can I tell the maven plugin schemagen to generate only the .xsd files and not the class files?
here is my pom:


<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxb2-maven-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<phase>generate-resources</phase>
<id>schemagen</id>
<goals>
<goal>schemagen</goal>
</goals>
<configuration>
<includes>
<include>com/delagelanden/rijee6/domain/*.java</include>
</includes>
<outputDirectory>${project.build.directory}/schemas</outputDirectory>
<verbose>true</verbose>
</configuration>
</execution>
</executions>
</plugin>


I didn't find any about this in the documentation,
thank you very much,
Miguel Garz

Reply | Threaded
Open this post in threaded view
|

Re: Maven Jaxb2 plugin (schemagen) generating classes

Anders Hammar
Right, I see this in the ITs as well now. I haven't worked with the schemagen part of the plugin but I suppose that might not be correct. Please file a ticket (and possibly a patch?)!

/Anders


On Wed, May 22, 2013 at 11:36 AM, Anders Hammar <[hidden email]> wrote:
So you get .class files in target/schemas?

/Anders


On Wed, May 22, 2013 at 11:31 AM, Miguel Garz <[hidden email]> wrote:
Good Morning everyone.
I'm having a problem with my Jaxb2 schemagen plugin for maven.
What happens is that the .xsd files are generated correctly in the output folder.
However within it are generated the .class files as well , polluting my directory.
My question is: how can I tell the maven plugin schemagen to generate only the .xsd files and not the class files?
here is my pom:


<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxb2-maven-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<phase>generate-resources</phase>
<id>schemagen</id>
<goals>
<goal>schemagen</goal>
</goals>
<configuration>
<includes>
<include>com/delagelanden/rijee6/domain/*.java</include>
</includes>
<outputDirectory>${project.build.directory}/schemas</outputDirectory>
<verbose>true</verbose>
</configuration>
</execution>
</executions>
</plugin>


I didn't find any about this in the documentation,
thank you very much,
Miguel Garz