<?xml version="1.0" encoding="UTF-8"?>
<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>at.asitplus.eidas.ms_specific</groupId>
    <artifactId>modules</artifactId>
    <version>1.1.1-SNAPSHOT</version>
  </parent>
  <groupId>at.asitplus.eidas.ms_specific.modules</groupId>
  <artifactId>authmodule-eIDAS-v2</artifactId>
  <name>eIDAS v2 authentication module</name>
  <description>eIDAS module based on eIDAS node reference implementation v2.x</description>

  <properties>
    <eidas-commons.version>2.4.0</eidas-commons.version>
    <eidas-light-commons.version>2.4.0</eidas-light-commons.version>
    <eidas-specific-communication-definition.version>2.4.0</eidas-specific-communication-definition.version>
    <eidas-jcache-ignite-specific-communication.version>2.4.0</eidas-jcache-ignite-specific-communication.version>
    <org.xerial.sqlite-jdbc.version>3.23.1</org.xerial.sqlite-jdbc.version>
  </properties>

  <profiles>
    <profile>
      <id>default</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <repositories>
        <repository>
          <id>egiz-commons</id>
          <url>https://apps.egiz.gv.at/maven/</url>
          <releases>
            <enabled>true</enabled>
          </releases>
        </repository>
        <repository>
          <id>eIDASNode-local</id>
          <name>local</name>
          <url>file:${basedir}/repository</url>
        </repository>
      </repositories>
    </profile>
  </profiles>

  <dependencies>
    <dependency>
      <groupId>at.gv.egiz.components</groupId>
      <artifactId>egiz-spring-api</artifactId>
    </dependency>
    <dependency>
      <groupId>at.asitplus.eidas.ms_specific</groupId>
      <artifactId>connector_lib</artifactId>
    </dependency>
    <dependency>
      <groupId>at.gv.egiz.eaaf</groupId>
      <artifactId>eaaf-core</artifactId>
    </dependency>

    <!-- eIDAS reference implemenation libs -->
    <dependency>
      <groupId>eu.eidas</groupId>
      <artifactId>eidas-commons</artifactId>
      <version>${eidas-commons.version}</version>
      <!--scope>provided</scope -->
      <exclusions>
        <exclusion>
          <groupId>log4j</groupId>
          <artifactId>log4j</artifactId>
        </exclusion>
        <exclusion>
          <artifactId>log4j-over-slf4j</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
      </exclusions>
    </dependency>

    <dependency>
      <groupId>eu.eidas</groupId>
      <artifactId>eidas-light-commons</artifactId>
      <version>${eidas-light-commons.version}</version>
    </dependency>

    <dependency>
      <groupId>eu.eidas</groupId>
      <artifactId>eidas-specific-communication-definition</artifactId>
      <version>${eidas-specific-communication-definition.version}</version>
    </dependency>

    <dependency>
      <groupId>eu.eidas</groupId>
      <artifactId>eidas-jcache-ignite-specific-communication</artifactId>
      <version>${eidas-jcache-ignite-specific-communication.version}</version>
    </dependency>

    <!-- other third party libs -->
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-lang3</artifactId>
    </dependency>
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
    </dependency>
    <dependency>
      <groupId>joda-time</groupId>
      <artifactId>joda-time</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-text</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-webmvc</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.cxf</groupId>
      <artifactId>cxf-rt-frontend-jaxws</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.cxf</groupId>
      <artifactId>cxf-rt-transports-http</artifactId>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.datatype</groupId>
      <artifactId>jackson-datatype-jsr310</artifactId>
    </dependency>

    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>javax.servlet-api</artifactId>
      <scope>provided</scope>
    </dependency>

    <!-- Testing -->
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-test</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.github.skjolber</groupId>
      <artifactId>mockito-soap-cxf</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.powermock</groupId>
      <artifactId>powermock-module-junit4</artifactId>
      <version>2.0.7</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.powermock</groupId>
      <artifactId>powermock-api-mockito2</artifactId>
      <version>2.0.7</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>at.gv.egiz.eaaf</groupId>
      <artifactId>eaaf_core_utils</artifactId>
      <scope>test</scope>
      <type>test-jar</type>
    </dependency>
    <dependency>
      <groupId>at.gv.egiz.eaaf</groupId>
      <artifactId>eaaf-core</artifactId>
      <scope>test</scope>
      <type>test-jar</type>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
      <version>2.11.2</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.bitbucket.b_c</groupId>
      <artifactId>jose4j</artifactId>
      <version>0.7.2</version>
    </dependency>
  </dependencies>

  <build>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
      </resource>
      <resource>
        <directory>target/generated-sources/cxf</directory>
      </resource>
    </resources>

    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>1.8</source>
          <target>1.8</target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-codegen-plugin</artifactId>
        <dependencies>
          <dependency>
            <groupId>xerces</groupId>
            <artifactId>xercesImpl</artifactId>
            <version>2.8.1</version>
          </dependency>
          <dependency>
            <groupId>com.sun.xml.bind</groupId>
            <artifactId>jaxb-impl</artifactId>
            <version>2.2.5</version>
          </dependency>
          <dependency>
            <groupId>com.sun.xml.bind</groupId>
            <artifactId>jaxb-xjc</artifactId>
            <version>2.2.5</version>
          </dependency>
        </dependencies>
        <executions>
          <execution>
            <id>generate-sources</id>
            <phase>generate-sources</phase>
            <configuration>
              <sourceRoot>${project.build.directory}/generated/cxf</sourceRoot>
              <wsdlOptions>
                <wsdlOption>
                  <wsdl>${basedir}/src/main/resources/szr_client/SZR_v4.0.wsdl</wsdl>
                  <extraargs>
                    <extraarg>-verbose </extraarg>
                  </extraargs>
                </wsdlOption>
              </wsdlOptions>
            </configuration>
            <goals>
              <goal>wsdl2java</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      
      <plugin>
        <groupId>com.github.spotbugs</groupId>
        <artifactId>spotbugs-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>spotbugs_validate</id>
            <phase>test</phase>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <failOnError>true</failOnError>
          <excludeFilterFile>spotbugs_exclude.xml</excludeFilterFile>
        </configuration>
      </plugin>


      <!-- enable co-existence of testng and junit -->
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <threadCount>1</threadCount>
        </configuration>
        <dependencies>
          <dependency>
            <groupId>org.apache.maven.surefire</groupId>
            <artifactId>surefire-junit47</artifactId>
            <version>${surefire.version}</version>
          </dependency>
        </dependencies>
      </plugin>
    </plugins>
  </build>
</project>