<?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>3.0.1</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.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-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-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-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>
    </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>
      <exclusions>
        <exclusion>
          <groupId>com.github.mmoayyed.cxf</groupId>
          <artifactId>cxf-rt-rs-extension-search</artifactId>
        </exclusion>
      </exclusions>
    </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</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-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-core</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-pm-webflow</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-u2f</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-support-u2f-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-support-webauthn</artifactId>
      <exclusions>
        <exclusion>
          <groupId>javax.ws.rs</groupId>
          <artifactId>javax.ws.rs-api</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.eclipse.jetty</groupId>
          <artifactId>jetty-servlet</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.glassfish.jersey.containers</groupId>
          <artifactId>jersey-container-servlet-core</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apereo.cas</groupId>
      <artifactId>cas-server-support-webauthn-core</artifactId>
      <exclusions>
        <exclusion>
          <groupId>javax.ws.rs</groupId>
          <artifactId>javax.ws.rs-api</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.eclipse.jetty</groupId>
          <artifactId>jetty-servlet</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.glassfish.jersey.containers</groupId>
          <artifactId>jersey-container-servlet-core</artifactId>
        </exclusion>
        <exclusion>
          <groupId>com.google.code.findbugs</groupId>
          <artifactId>jsr305</artifactId>
        </exclusion>
      </exclusions>
    </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-oidc-services</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-authentication-attributes</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-webapp-config</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.springframework.boot</groupId>
      <artifactId>spring-boot-starter-web</artifactId>
      <exclusions>
        <exclusion>
          <groupId>org.springframework.boot</groupId>
          <artifactId>spring-boot-starter-logging</artifactId>
        </exclusion>
      </exclusions>    
    </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.bouncycastle</groupId>
      <artifactId>bcprov-jdk15on</artifactId>
    </dependency>
    <dependency>
      <groupId>org.bouncycastle</groupId>
      <artifactId>bcpkix-jdk15on</artifactId>
    </dependency>

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

    <dependency>
      <groupId>org.apache.cxf</groupId>
      <artifactId>cxf-rt-transports-http-jetty</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.springframework.boot</groupId>
      <artifactId>spring-boot-starter-test</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter</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-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.test.skip>true</maven.test.skip>
      </properties>

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

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

        <dependency>
          <groupId>com.h2database</groupId>
          <artifactId>h2</artifactId>
        </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
                -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>
