<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>eu.europa.ec.joinup.sd-dss</groupId>
		<artifactId>sd-dss</artifactId>
		<version>5.12</version>
	</parent>

	<artifactId>specs-validation-report</artifactId>
	<name>JAXB ETSI Validation Report Model</name>
	<description>Generated sources from the ETSI Validation Report XML Schema (ETSI TS 119 102-2).</description>

	<properties>
		<module-name>jpms_dss_specs_validation_report</module-name>
	</properties>
	
	<dependencies>
		<dependency>
			<groupId>eu.europa.ec.joinup.sd-dss</groupId>
			<artifactId>specs-xmldsig</artifactId>
		</dependency>
		<dependency>
			<groupId>eu.europa.ec.joinup.sd-dss</groupId>
			<artifactId>specs-xades</artifactId>
		</dependency>
		<dependency>
			<groupId>eu.europa.ec.joinup.sd-dss</groupId>
			<artifactId>specs-trusted-list</artifactId>
		</dependency>

		<dependency>
			<groupId>eu.europa.ec.joinup.sd-dss</groupId>
			<artifactId>dss-jaxb-parsers</artifactId>
		</dependency>

		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
		</dependency>

		<dependency>
		    <groupId>org.junit.platform</groupId>
		    <artifactId>junit-platform-launcher</artifactId>
		    <scope>test</scope>
		</dependency>
		<dependency>
		    <groupId>org.junit.jupiter</groupId>
		    <artifactId>junit-jupiter-engine</artifactId>
		    <scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.jvnet.jaxb2.maven2</groupId>
				<artifactId>maven-jaxb2-plugin</artifactId>
				<executions>
					<execution>
						<id>generate-classes</id>
						<phase>generate-sources</phase>
						<goals>
							<goal>generate</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<schemaDirectory>src/main/resources/xsd</schemaDirectory>
					<schemaIncludes>
						<schemaInclude>1910202xmlSchema.xsd</schemaInclude>
					</schemaIncludes>
					<catalog>src/main/resources/xsd/catalog.cat</catalog>
					<bindingIncludes>
						<include>bindings.xml</include>
					</bindingIncludes>

					<extension>true</extension>
					<useDependenciesAsEpisodes>true</useDependenciesAsEpisodes>

					<strict>false</strict>
					<specVersion>2.1</specVersion>
					<episode>true</episode>
					<locale>en</locale>

					<disableXmlSecurity>false</disableXmlSecurity>
					<accessExternalSchema>file</accessExternalSchema>
					<accessExternalDTD>file</accessExternalDTD>
				</configuration>
				<dependencies>
					<dependency>
						<groupId>org.glassfish.jaxb</groupId>
						<artifactId>jaxb-runtime</artifactId>
						<version>2.3.8</version>
					</dependency>
				</dependencies>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-antrun-plugin</artifactId>
				<executions>
					<execution>
						<id>remove-duplicate-sources</id>
						<phase>process-sources</phase>
						<goals>
							<goal>run</goal>
						</goals>
						<configuration>
							<target>
								<delete dir="${basedir}/target/generated-sources/xjc/eu/europa/esig/xmldsig" />
							</target>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>build-helper-maven-plugin</artifactId>
				<executions>
					<execution>
						<id>add-source</id>
						<!-- after generate-sources / process-sources -->
						<phase>compile</phase>
						<goals>
							<goal>add-source</goal>
						</goals>
						<configuration>
							<sources>
								<source>${project.build.directory}/generated-sources/xjc/</source>
							</sources>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
	
	<profiles>
		<profile>
            <id>jdk19-plus</id>
            <activation>
                <jdk>[9,13)</jdk>
            </activation>
            <properties>
				<!-- specs-xmldsig\target\generated-sources\xjc\eu\europa\esig\xmldsig\jaxb\package-info.java:8: error: unknown tag: javax.xml.bind.annotation.XmlSchema -->
				<maven.javadoc.skip>true</maven.javadoc.skip>
            </properties>
		</profile>
	</profiles>
</project>