<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>9.0.0</version>
    </parent>
    <artifactId>authzforce-ce-xacml-model</artifactId>
    <name>${project.groupId}:${project.artifactId}</name>
    <description>AuthzForce - Java model (JAXB) for OASIS XACML Core Specification. This project also includes the OASIS
        XACML schema, standard XACML identifiers as Java enums, and JAXB-related utilities.
    </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>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>${artifactId.prefix}-xmlns-model</artifactId>
            <version>${project.parent.version}</version>
        </dependency>
        <dependency>
            <!-- https://github.com/highsource/jaxb-tools/wiki/Using-JAXB2-Basics-Plugins#adding-jaxb2-basics-runtime-dependency-to-your-projectjaxb2-basics-runtime -->
            <!-- Required for -XtoString -->
            <groupId>org.jvnet.jaxb</groupId>
            <artifactId>jaxb-plugins-runtime</artifactId>
        </dependency>
        <dependency>
            <groupId>jakarta.xml.bind</groupId>
            <artifactId>jakarta.xml.bind-api</artifactId>
        </dependency>
        <!-- Test dependencies -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jaxb</groupId>
            <artifactId>jaxb-runtime</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.owasp</groupId>
                <artifactId>dependency-check-maven</artifactId>
                <configuration>
                    <cveValidForHours>24</cveValidForHours>
                    <!-- The plugin has numerous issues with version matching, which triggers false positives, so we need a "suppression" file for those. More info: https://github.com/jeremylong/DependencyCheck/issues -->
                    <suppressionFile>owasp-dependency-check-suppression.xml</suppressionFile>
                    <failBuildOnAnyVulnerability>true</failBuildOnAnyVulnerability>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <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>
            <plugin>
                <groupId>org.jvnet.jaxb</groupId>
                <artifactId>jaxb-maven-plugin</artifactId>
                <configuration>
                    <specVersion>4.0.2</specVersion>
                    <verbose>false</verbose>
                    <extension>true</extension>
                    <strict>false</strict>
                    <useDependenciesAsEpisodes>true</useDependenciesAsEpisodes>
                    <args>
                        <arg>-XsimpleEquals</arg>
                        <arg>-XsimpleHashCode</arg>
                        <arg>-XtoString</arg>
                        <arg>-Ximm</arg>
                        <arg>-Ximm-nofinalclasses</arg>
                    </args>
                    <plugins>
                        <!-- https://github.com/highsource/jaxb-tools/wiki/Using-JAXB2-Basics-Plugins#using-jaxb-plugins-with-maven -->
                        <!-- https://github.com/highsource/jaxb-tools/wiki/JAXB-Tools-Migration-Guide#migration-from-v2-to-v3 -->
                        <!-- Plugin required for -XtoString, -XsimpleEquals -->
                        <plugin>
                            <groupId>org.jvnet.jaxb</groupId>
                            <artifactId>jaxb-plugins</artifactId>
                            <version>${jaxb-plugins.version}</version>
                        </plugin>
                        <plugin>
                            <groupId>com.github.sabomichal</groupId>
                            <artifactId>immutable-xjc-plugin</artifactId>
                            <version>${immutable-xjc-plugins.version}</version>
                        </plugin>
                    </plugins>
                    <bindingDirectory>src/main/jaxb</bindingDirectory>
                    <catalog>src/main/jaxb/catalog.xml</catalog>
                    <schemaDirectory>src/main/resources</schemaDirectory>
                    <schemaIncludes>
                        <include>xacml-core-v3-schema-wd-17.xsd</include>
                    </schemaIncludes>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <skipTests>false</skipTests>
                    <systemPropertyVariables>
                        <javax.xml.accessExternalSchema>all</javax.xml.accessExternalSchema>
                    </systemPropertyVariables>
                    <environmentVariables>
                        <!-- Test environment variable for DefaultEnvironmentPropertiesTest class -->
                        <AUTHZFORCE_DATA_DIR>/tmp/authzforce</AUTHZFORCE_DATA_DIR>
                    </environmentVariables>
                    <properties>
                        <property>
                            <name>surefire.testng.verbose</name>
                            <!-- verbosity level from 0 to 10 (10 is the most detailed), or -1 for debug. More info: http://maven.apache.org/surefire/maven-surefire-plugin/examples/testng.html -->
                            <value>3</value>
                        </property>
                    </properties>
                    <includes>
                        <include>**/MainTest.java</include>
                    </includes>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
