maven plugin suggestion
Opened this issue · 0 comments
GoogleCodeExporter commented
What is the expected output? What do you see instead?
It would be fine to use trang as a maven plugin like this:
<pre>
<code>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
(...)
<dependencies>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<!-- goal: trang:rnc2xsd -->
<plugin>
<groupId>com.thaiopensource.trang</groupId>
<artifactId>trang-maven-plugin</artifactId>
<version>1.0.7</version>
<executions>
<execution>
<goals>
<goal>rnc2xsd</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<dir>schemas</dir>
<includes>
<include>*.rnc</include>
</includes>
<outputDir>target/generated-sources/trang</outputDir>
</configuration>
</execution>
</executions>
</plugin>
<!-- goal: jaxb2:xjc -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxb2-maven-plugin</artifactId>
<version>1.3</version>
<executions>
<execution>
<goals>
<goal>xjc</goal>
</goals>
<phase>generate-sources</phase>
</execution>
</executions>
<configuration>
<verbose>false</verbose>
<explicitAnnotation>true</explicitAnnotation>
<clearOutputDir>false</clearOutputDir>
<schemaDirectory>target/generated-sources/trang</schemaDirectory>
<schemaFiles>testsequence.xsd</schemaFiles>
<bindingDirectory>./</bindingDirectory>
<bindingFiles>schemas/bindings.xjb</bindingFiles>
</configuration>
</plugin>
</plugins>
<sourceDirectory>target/generated-sources/jaxb</sourceDirectory>
</build>
</project>
</code>
</pre>
My solution is on attached files.
Original issue reported on code.google.com by clement....@gmail.com
on 27 Mar 2012 at 9:04
Attachments: