<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>at.asitplus.eidas</groupId>
    <artifactId>ms_specific</artifactId>
    <version>1.3.1-SNAPSHOT</version>
  </parent>  
  <groupId>at.asitplus.eidas.ms_specific</groupId>
  <artifactId>ms_specific_proxyservice</artifactId>
  <packaging>war</packaging>
  <name>MS-specific Proxy-Service</name>
  <description>Austria specific eIDAS ms-specific Proxy-Service implementation</description>
  
   <dependencies>
    <dependency>
      <groupId>at.gv.egiz.components</groupId>
      <artifactId>egiz-spring-api</artifactId>
    </dependency>
    <dependency>
      <groupId>at.gv.egiz.components</groupId>
      <artifactId>eventlog-slf4j</artifactId>
    </dependency>
    <dependency>
      <groupId>at.gv.egiz.eaaf</groupId>
      <artifactId>eaaf-core</artifactId>
    </dependency>
    <dependency>
      <groupId>at.asitplus.eidas.ms_specific</groupId>
      <artifactId>core_common_lib</artifactId>
    </dependency>
    <dependency>
      <groupId>at.asitplus.eidas.ms_specific</groupId>
      <artifactId>core_common_webapp</artifactId>
    </dependency>    
    <dependency>
      <groupId>at.asitplus.eidas.ms_specific.modules</groupId>
      <artifactId>eidas_proxy-sevice</artifactId>
    </dependency>
    <dependency>
      <groupId>at.asitplus.eidas.ms_specific.modules</groupId>
      <artifactId>authmodule_id-austria</artifactId>
    </dependency>        
    
    <!-- Third party libs -->       
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-actuator</artifactId>
    </dependency>
    <dependency>
          <groupId>org.springframework.boot</groupId>
          <artifactId>spring-boot-starter-web</artifactId>
          <exclusions>
            <exclusion>
              <groupId>org.springframework.boot</groupId>
              <artifactId>spring-boot-starter-tomcat</artifactId>
            </exclusion>
          </exclusions>
        </dependency>     
    <dependency>
      <groupId>de.codecentric</groupId>
      <artifactId>spring-boot-admin-starter-client</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-webmvc</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-context</artifactId>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-to-slf4j</artifactId>
    </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>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-test</artifactId>
      <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>at.asitplus.eidas.ms_specific</groupId>
      <artifactId>core_common_webapp</artifactId>
      <scope>test</scope>
      <type>test-jar</type>
    </dependency>            
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-tomcat</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>at.gv.egiz.eaaf</groupId>
      <artifactId>eaaf-springboot-utils</artifactId>
      <scope>test</scope>
    </dependency>         
  </dependencies>
  
  <profiles>
    <profile>
     <id>default</id>
      <activation>
        <activeByDefault>true</activeByDefault>
        <property>
          <name>default</name>
        </property>
      </activation>
      <dependencies>        
        <dependency>
          <groupId>javax.servlet</groupId>
          <artifactId>javax.servlet-api</artifactId>
          <scope>provided</scope>
        </dependency>
      </dependencies>
    </profile>
    <profile>
     <id>embbededTomcat</id>
      <dependencies>
        <dependency>
          <groupId>org.springframework.boot</groupId>
          <artifactId>spring-boot-starter-tomcat</artifactId>
        </dependency>
        <dependency>
          <groupId>at.gv.egiz.eaaf</groupId>
          <artifactId>eaaf-springboot-utils</artifactId>
        </dependency>        
      </dependencies>
    </profile>   
  </profiles>    
   
<build>
    <finalName>ms_proxyservice</finalName>

    <plugins>
      <!-- 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>

      <plugin>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-maven-plugin</artifactId>
        <version>2.2.6.RELEASE</version>
        <configuration>
          <executable>true</executable>
          <!-- layout>ZIP</layout -->
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>build-info</goal>
              <goal>repackage</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-assembly-plugin</artifactId>
        <configuration>
          <descriptors>
            <descriptor>src/assembly/assembly_dir.xml</descriptor>
            <descriptor>src/assembly/assembly_zip.xml</descriptor>
          </descriptors>
          <finalName>${project.artifactId}-${project.version}</finalName>
          <outputDirectory>${project.parent.build.directory}</outputDirectory>
        </configuration>
        <executions>
          <execution>
            <id>make-assembly</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>com.github.spotbugs</groupId>
        <artifactId>spotbugs-maven-plugin</artifactId>
        <version>${spotbugs-maven-plugin.version}</version>
        <configuration>
          <excludeFilterFile>checks/spotbugs-exclude.xml</excludeFilterFile>
        </configuration>
      </plugin>

    </plugins>
  </build>
  
</project>