<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>
	<parent>
		<groupId>org.ow2.authzforce</groupId>
		<artifactId>authzforce-ce-parent</artifactId>
		<version>8.5.0</version>
	</parent>
	<artifactId>authzforce-ce-xmlns-model</artifactId>
	<name>${project.groupId}:${project.artifactId}</name>
	<description>AuthZForce - "xml:" Namespace Model. XML schema from http://www.w3.org/2001/xml.xsd and corresponding XJC episode that is useable for JAXB class generation from XSD importing xml.xsd.</description>
	<url>${project.url}</url>
	<scm>
		<connection>scm:git:${git.url.base}/parent.git</connection>
		<developerConnection>scm:git:${git.url.base}/parent.git</developerConnection>
		<tag>HEAD</tag>
		<url>${git.url.base}/parent</url>
	</scm>
	<dependencies>

	</dependencies>
	<build>
		<plugins>
			<plugin>
				<groupId>com.mycila</groupId>
				<artifactId>license-maven-plugin</artifactId>
				<configuration>
					<header>license/alv2-header.txt</header>
					<includes>
						<include>src/main/java/**</include>
						<include>src/test/java/**</include>
					</includes>
				</configuration>
				<executions>
					<execution>
						<id>format-sources-license</id>
						<phase>process-sources</phase>
						<goals>
							<goal>format</goal>
						</goals>
					</execution>
					<execution>
						<id>format-test-sources-license</id>
						<phase>process-test-sources</phase>
						<goals>
							<goal>format</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
				<!--
				 Issues porting the maven-jaxb2-plugin to Java 11:
				 - Plugin dev seems dead: https://github.com/highsource/maven-jaxb2-plugin/issues/193
				 - Not compatible with new Jakarta XML Binding (starting with v3.0.0, jakarta.xml.bind replaces javax.xml.bind packages): https://github.com/highsource/maven-jaxb2-plugin/issues/191
				 - Not compatible with JDK 11+: https://github.com/highsource/maven-jaxb2-plugin/issues/190, https://github.com/highsource/maven-jaxb2-plugin/issues/167

				 Alternatives:
				 - JAXB tooling artifacts (jaxb-xjc): https://eclipse-ee4j.github.io/jaxb-ri/2.3.3/docs/ch03.html#deployment-maven-coordinates
				 - mojohaus/jaxb2-maven-plugin: Supporting new Jakarta-style JAXB API: https://github.com/mojohaus/jaxb2-maven-plugin/issues/138
				 - jax-maven-plugin (fixes issues in two above alternatives) https://github.com/davidmoten/jax-maven-plugin
				-->
			<plugin>
				<groupId>org.jvnet.jaxb</groupId>
				<artifactId>jaxb-maven-plugin</artifactId>
				<configuration>
					<verbose>false</verbose>
					<extension>true</extension>
					<strict>true</strict>
					<schemaDirectory>src/main/resources</schemaDirectory>
					<schemaIncludes>
						<include>xml.xsd</include>
					</schemaIncludes>
				</configuration>
				<executions>
					<execution>
						<goals>
							<goal>generate</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<!-- Invoke tooling API (Java 11) to generate Java sources from schema. 2 methods: using exec-maven-plugin OR jaxb2-maven-plugin-->
			<!--
					<dependency>
			<groupId>com.sun.xml.bind</groupId>
			<artifactId>jaxb-xjc</artifactId>
			<version>${jaxb.version}</version>
			<scope>compile</scope>
		</dependency>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>exec-maven-plugin</artifactId>
				<execution>
					<id>xjc</id>
					<goals>
						<goal>exec</goal>
					</goals>
					<configuration>
						<executable>java</executable>
						<arguments>
							<argument>-module-path</argument>
							<modulepath />
							<argument>-m</argument>
							<argument>com.sun.tools.xjc</argument>
							<argument>-p</argument>
							<argument>com.example</argument>
							<argument>-d</argument>
							<argument>${project.build.directory}/generated-sources</argument>
							<argument>${project.build.directory}/classes/schema.xsd</argument>
						</arguments>
					</configuration>
				</execution>
			</plugin>

<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>jaxb2-maven-plugin</artifactId>
				<version>2.5.0</version>
				<configuration>
					<verbose>true</verbose>
					<extension>true</extension>
					<laxSchemaValidation>false</laxSchemaValidation>
					<sources>
						<source>src/main/resources/xml.xsd</source>
					</sources>
					<xsdPathWithinArtifact>.</xsdPathWithinArtifact>
				</configuration>
				<executions>
					<execution>
						<goals>
							<goal>xjc</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			-->
		</plugins>
	</build>
</project>
