OK - I see the strict setting in com.sun.tools.xjc.Options - I'll add a
"strict" flag and set its default to true.
How would we set custom extensions (by classname) using XJC2Task/Options?
-----Original Message-----
From: Malachi de Ælfweald [mailto:malachid_at_gmail.com]
Sent: Thursday, March 09, 2006 1:25 AM
To: users_at_jaxb.dev.java.net
Subject: Re: Maven 2 xjc plugin - update notice
what about custom extensions (by classname) and non-strict(-nv) handling?
On 3/8/06, Jonathan Johnson <jonjohnson_at_mail.com> wrote:
Malachi and Kohsuke,
I have updated and tested the Maven 2 xjc plugin. Here are the changes.
- Added directory scanning for **/* include/exclude.
- Binding files are now included/excluded.
- Schema default directory is now "${basedir}/src/main/resources"
- Removed dependency on oro jar.
- Default binding include search is *.xjb"
- Removed old code.
Are there other outstanding issues? If I missed something from your
previous threads it was not intentional. The threads were difficult to
sort
out. Please just reiterate any points or ideas that need to be
addressed.
The possible settings are
schemaDirectory
includeSchemas
excludeSchemas
includeBindings
excludeBindings
generatePackage
generateDirectory
readOnly
extension
catalog
removeOldOutput
verbose
Below is an example pom.xml that can invoke the plugin.
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId> com.isea.</groupId>
<artifactId>JAXBSample</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>maven-jaxb-plugin example</name>
<description>Example usage of maven-jaxb-plugin, the xjc compiler.
Invoked in the
M2 generate phase</description>
<url>
http://maven.apache.org </url>
<repositories>
<repository>
<id>java.net</id>
<name>java.net Maven Repository</name>
<url>
https://maven-repository.dev.java.net/nonav/repository</
url
>
<layout>legacy</layout>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>jaxb</groupId>
<artifactId>jaxb-api</artifactId>
<version> 2.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>jaxb</groupId>
<artifactId>jaxb-impl</artifactId>
<version> 2.0-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>com.sun.tools.xjc.maven2 </groupId>
<artifactId>maven-jaxb-plugin</artifactId>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<includeSchemas>
<includeSchema>*.xsd</includeSchema>
</includeSchemas>
<excludeSchemas>
<excludeSchema>excluded*.xsd</excludeSchema>
</excludeSchemas>
<generatePackage>com.foo</generatePackage>
<verbose>true</verbose>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net