<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.
-->
<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.apache.syncope</groupId>
    <artifactId>syncope-wa</artifactId>
    <version>4.1.0</version>
  </parent>

  <name>Apache Syncope WA Spring Boot Starter</name>
  <description>Apache Syncope WA Spring Boot Starter</description>
  <groupId>org.apache.syncope.wa</groupId>
  <artifactId>syncope-wa-starter</artifactId>
  <packaging>jar</packaging>
  
  <properties>
    <rootpom.basedir>${basedir}/../..</rootpom.basedir>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.springframework.cloud</groupId>
      <artifactId>spring-cloud-starter-bootstrap</artifactId>
    </dependency>

    <dependency>
      <groupId>org.apache.syncope.wa</groupId>
      <artifactId>syncope-wa-bootstrap</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.syncope.common.keymaster</groupId>
      <artifactId>syncope-common-keymaster-client-api</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.syncope.client.am</groupId>
      <artifactId>syncope-client-am-lib</artifactId>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-core-audit</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-core-audit-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-core-scripting</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-core-events-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-core-authentication</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-core-configuration</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-core-cookie</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-core-logout</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-core-logging</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-core-services</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-core-authentication-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-core-services-registry</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-core-services-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-core-tickets</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-support-session-ticket-registry</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-core-util</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-core-validation</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-core-web</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-core-webflow</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-core-events-configuration</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-support-configuration-metadata-repository</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-support-webconfig</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-support-thymeleaf</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-support-actions</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-support-jpa-util</artifactId>
      <exclusions>
        <exclusion>
          <groupId>org.apereo.cas</groupId>
          <artifactId>cas-server-support-jdbc-drivers</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-support-ldap</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-support-reports</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-support-syncope-authentication</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-support-azuread-authentication</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-support-okta-authentication</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-support-saml</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-support-person-directory</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-support-person-directory-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-support-themes-bootstrap</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-support-saml-idp</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-support-saml-idp-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-support-oidc</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-support-oidc-core-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-support-oidc-services</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-support-oauth-services</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-support-validation</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-support-pac4j-webflow</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-support-pac4j-core-clients</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-support-consent-webflow</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-support-aup-webflow</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-support-webauthn</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-support-webauthn-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-support-simple-mfa</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-support-simple-mfa-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-support-gauth</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-support-ldap-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-support-gauth-ldap</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-support-duo</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-support-gauth-core-mfa</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-support-otp-mfa-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-support-trusted-mfa</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-support-trusted-mfa-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-support-swagger</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-core-services-authentication</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-support-surrogate-webflow</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-support-surrogate-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-support-passwordless-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-support-x509-webflow</artifactId>
    </dependency>

    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-support-pac4j-saml</artifactId>
    </dependency>
    <dependency>
      <groupId>org.pac4j</groupId>
      <artifactId>pac4j-saml</artifactId>
    </dependency>

    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-support-pac4j-oidc</artifactId>
    </dependency>
    <dependency>
      <groupId>org.pac4j</groupId>
      <artifactId>pac4j-oidc</artifactId>
    </dependency>

    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-support-pm-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-support-pm-webflow</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-support-pm-ldap</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-support-pm-jdbc</artifactId>
      <exclusions>
        <exclusion>
          <groupId>org.apereo.cas</groupId>
          <artifactId>cas-server-support-jdbc-drivers</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-support-pm-rest</artifactId>
    </dependency>

    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-web</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-actuator</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-security</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-validation</artifactId>
    </dependency>

    <dependency>
      <groupId>com.fasterxml.jackson.module</groupId>
      <artifactId>jackson-module-kotlin</artifactId>
    </dependency>

    <dependency>
      <groupId>commons-codec</groupId>
      <artifactId>commons-codec</artifactId>
    </dependency>

    <dependency>
      <groupId>org.apache.cxf</groupId>
      <artifactId>cxf-rt-transports-http-netty-server</artifactId>
      <version>${cxf.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.syncope.common.keymaster</groupId>
      <artifactId>syncope-common-keymaster-client-zookeeper</artifactId>
      <version>${project.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.curator</groupId>
      <artifactId>curator-test</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-tomcat</artifactId>
      <scope>test</scope>      
    </dependency>
    <dependency>
      <groupId>org.awaitility</groupId>
      <artifactId>awaitility</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-test</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>io.github.git-commit-id</groupId>
        <artifactId>git-commit-id-maven-plugin</artifactId>
        <configuration>
          <failOnNoGitDirectory>false</failOnNoGitDirectory>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-maven-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>build-info</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <systemPropertyVariables>
            <syncope.conf.dir>${project.build.directory}/test-classes</syncope.conf.dir>
          </systemPropertyVariables>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
      </plugin>
    </plugins>

    <resources>
      <resource>
        <directory>src/main/resources</directory>
        <filtering>true</filtering>
      </resource>
      
      <resource>
        <directory>${basedir}/../../src/main/resources</directory>
        <filtering>true</filtering>
        <includes>
          <include>banner.txt</include>
        </includes>
      </resource>
    </resources>

    <testResources>
      <testResource>
        <directory>${basedir}/src/test/resources</directory>
        <filtering>true</filtering>
      </testResource>
    </testResources>
  </build>
  
  <profiles>
    <profile>
      <id>debug</id>

      <properties>
        <maven.build.cache.skipCache>true</maven.build.cache.skipCache>
        <maven.test.skip>true</maven.test.skip>
      </properties>

      <dependencies>
        <dependency>
          <groupId>org.springframework.boot</groupId>
          <artifactId>spring-boot-starter-tomcat</artifactId>
        </dependency>

        <dependency>
          <groupId>org.apache.syncope.common.keymaster.self</groupId>
          <artifactId>syncope-common-keymaster-client-self</artifactId>
          <version>${project.version}</version>
        </dependency>
      </dependencies>

      <build>
        <defaultGoal>clean package spring-boot:run</defaultGoal>

        <plugins>
          <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <configuration>
              <jvmArguments>
                -Djavax.net.ssl.trustStore=${basedir}/../../fit/wa-reference/src/test/resources/keystore.jks -Djavax.net.ssl.trustStorePassword=password
                -Dsyncope.conf.dir=${project.build.directory}/test-classes
                -Xdebug -Xrunjdwp:transport=dt_socket,address=8001,server=y,suspend=n
              </jvmArguments>
              <profiles>
                <profile>debug</profile>
              </profiles>
            </configuration>
          </plugin>
        </plugins>

        <resources>
          <resource>
            <directory>${basedir}/src/test/resources/debug</directory>
            <filtering>true</filtering>
          </resource>
        </resources>
      </build>
    </profile>
  </profiles>
</project>
