Skip to content

Configuration Cheat Sheet

Steffen Hohn edited this page Nov 29, 2018 · 13 revisions

Work in progress

<schemaDirectory>src/main/resources</schemaDirectory>
<schemaIncludes>
	<include>*.xsd</include>
</schemaIncludes>
<!-- By default, nothing is excluded. -->
<schemaExcludes>
	<include>*.xs</include>
</schemaExcludes>

<schemas>
	<schema>
		<!-- Specifies a schema from the Maven artifact. -->
		<dependencyResource>
			<groupId>org.jvnet.jaxb2.maven2</groupId>
			<artifactId>maven-jaxb2-plugin-tests-po</artifactId>
			<!--  Version of the artifact. May be omitted.
			The plugin will then try to find the version using
			the dependencyManagement and dependencies of the project. -->
			<version>${project.version}</version>
			<!-- Path of the resource within the artifact. -->
			<resource>purchaseorder.xsd</resource>
		</dependencyResource>
	</schema>
	<schema>
		<url>http://schemas.opengis.net/wms/1.3.0/exceptions_1_3_0.xsd</url>
	</schema>
	<schema>
		<!-- Specifies a schema in the Maven artifact. -->
		<url>maven:org.jvnet.jaxb2.maven2:maven-jaxb2-plugin-tests-po!/po.xsd</url>
	</schema>
	<schema>
		<fileset>
			<!-- Defaults to schemaDirectory. -->
			<directory>${basedir}/src/main/schemas</directory>
                        <!-- Defaults to schemaIncludes. -->
			<includes>
				<include>*.xsd</include>
			</includes>
			<!-- Defaults to schemaIncludes -->
			<excludes>
				<exclude>*.xs</exclude>
			</excludes>
		</fileset>
	</schema>
</schemas>

<!-- DTD, XMLSCHEMA, RELAXNG, RELAXNG_COMPACT, WSDL, AUTODETECT. -->
<schemaLanguage>AUTODETECT</schemaLanguage>

<!-- Default to the schemaDirectory -->
<bindingDirectory>src/main/resources</bindingDirectory>
<bindingIncludes>
	<include>**/*.xjb</include>
</bindingIncludes>
<!-- By default, nothing is excluded. -->
<bindingExcludes>
	<include>**/*.xjb</include>
</bindingExcludes>

<bindings>
	<binding>
		<dependencyResource>...</dependencyResource>
	</binding>
	<binding>
		<url>...</url>
	</binding>
	<binding>
		<fileset>
			<!-- Defaults to bindingDirectory. -->
			<directory>${basedir}/src/main/bindings</directory>
                        <!-- Defaults to bindingIncludes. -->
			<includes>
				<include>*.xjb</include>
			</includes>
			<!--  Defaults to bindingExcludes. -->
			<excludes>
				<exclude>*.xj</exclude>
			</excludes>
		</fileset>
	</binding>
</bindings>

<scanDependenciesForBindings>false</scanDependenciesForBindings>

<catalog>src/main/resources/catalog.cat</catalog>

<catalogs>
	<catalog>
		<dependencyResource>...</dependencyResource>
	</catalog>
	<catalog>
		<url>...</url>
	</catalog>
	<catalog>
		<fileset>
			<!-- Defaults to schemaDirectory. -->
			<directory>${basedir}/src/main/catalogs</directory>
			<!-- Defaults to *.cat. -->
			<includes>
				<include>*.cat</include>
			</includes>
			<!-- By default nothing is excluded. -->
			<excludes>
				<exclude>*.ct</exclude>
			</excludes>
		</fileset>
	</catalog>
</catalogs>

<!-- Default is true. -->
<episode>true</episode>
<episodeFile>${project.build.directory}/generated-sources/xjc/META-INF/sun-jaxb.episode</episodeFile>
<!-- Automatically adds if-exists="true" to schema bindings in the generated episode -->
<addIfExistsToEpisodeSchemaBindings>true</addIfExistsToEpisodeSchemaBindings>

<useDependenciesAsEpisodes>false</useDependenciesAsEpisodes>
<episodes>
	<episode>
		<groupId>org.jvnet.jaxb2.maven2</groupId>
		<artifactId>maven-jaxb2-plugin-tests-po</artifactId>
		<!--  Version of the artifact. May be omitted.
		The plugin will then try to find the version using
		the dependencyManagement and dependencies of the project. -->
		<version>${project.version}</version>
	</episode>
</episodes>

<!-- If set to true, passes Maven's active proxy settings to XJC. -->
<useActiveProxyAsHttpproxy>true</useActiveProxyAsHttpproxy>

<!-- Plugins -->
<args>
	<arg>-XtoString</arg>
	<arg>-Xequals</arg>
	<arg>-XhashCode</arg>
	<arg>-Xcopyable</arg>
</args>
<plugins>
	<plugin>
		<groupId>org.jvnet.jaxb2_commons</groupId>
		<artifactId>jaxb2-basics</artifactId>
		<version><!-- Version --></version>
	</plugin>
</plugins>

<generateDirectory>${project.build.directory}/generated-sources/xjc</generateDirectory>
<!-- Default is unspecified -->
<generatePackage>com.acme.foo</generatePackage>

<writeCode>true</writeCode>
<readOnly>false</readOnly>
<packageLevelAnnotations>false</packageLevelAnnotations>
<noFileHeader>false</noFileHeader>
<enableIntrospection>false</enableIntrospection>
<markGenerated>false</markGenerated>

<removeOldOutput>false</removeOldOutput>
<cleanPackageDirectories>true</cleanPackageDirectories>
<forceRegenerate>false</forceRegenerate>

<encoding>${project.build.sourceEncoding}</encoding>
<!-- Default value is unspecified. -->
<locale>en</locale>

<specVersion>2.2</specVersion>

<!-- Default is false. -->
<extension>true</extension>
<strict>true</strict>

<disableXmlSecurity>true</disableXmlSecurity>
<accessExternalSchema>all</accessExternalSchema>
<accessExternalDTD>all</accessExternalDTD>

<debug>false</debug>
<!-- Set automatically by mvn -X -->
<verbose>true</verbose>

<disableDefaultExcludes>false</disableDefaultExcludes>

<addCompileSourceRoot>true</addCompileSourceRoot>
<addTestCompileSourceRoot>false</addTestCompileSourceRoot>

<contentForWildcard>false</contentForWildcard>

<produces>
	<pattern>**/*.*</pattern>
</produces>

<otherDependsIncludes>
	<pattern>**/*.*</pattern>
</otherDependsIncludes>
<otherDependsExcludes>
	<pattern>**/*.xs</pattern>
</otherDependsExcludes>
<!-- Deprecated, use otherDependsIncludes and otherDependsExcludes instead -->
<otherDepends>
	<file>src/main/resources/schema.xsd</file>
</otherDepends>
Clone this wiki locally