<?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.client</groupId>
    <artifactId>syncope-client-idrepo</artifactId>
    <version>4.1.1</version>
  </parent>

  <name>Apache Syncope Client IdRepo Enduser</name>
  <description>Apache Syncope Client IdRepo Enduser</description>
  <groupId>org.apache.syncope.client.idrepo</groupId>
  <artifactId>syncope-client-idrepo-enduser</artifactId>
  <packaging>jar</packaging>
  
  <properties>
    <rootpom.basedir>${basedir}/../../..</rootpom.basedir>
  </properties>
  
  <dependencies>
    <dependency> 
      <groupId>jakarta.servlet</groupId> 
      <artifactId>jakarta.servlet-api</artifactId> 
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>com.giffing.wicket.spring.boot.starter</groupId>
      <artifactId>wicket-spring-boot-starter</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-log4j2</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.apache.syncope.client.idrepo</groupId>
      <artifactId>syncope-client-idrepo-common-ui</artifactId>      
      <version>${project.version}</version>
    </dependency>
      
    <dependency>
      <groupId>org.webjars</groupId>
      <artifactId>font-awesome</artifactId>
    </dependency>
    <dependency>
      <groupId>org.webjars</groupId>
      <artifactId>ionicons</artifactId>
    </dependency>
    <dependency>
      <groupId>org.webjars</groupId>
      <artifactId>jsplumb</artifactId>
    </dependency>
    <dependency>
      <groupId>org.webjars</groupId>
      <artifactId>jquery-cookie</artifactId>
    </dependency>
    <dependency>
      <groupId>org.webjars</groupId>
      <artifactId>jQuery-slimScroll</artifactId>
    </dependency>
    <dependency>
      <groupId>org.webjars.npm</groupId>
      <artifactId>bootbox</artifactId>
    </dependency>

    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-text</artifactId>
    </dependency>

    <dependency>
      <groupId>com.lmax</groupId>
      <artifactId>disruptor</artifactId>
    </dependency>

    <dependency>
      <groupId>org.apache.wicket</groupId>
      <artifactId>wicket-tester</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>us.hebi.sass</groupId>
        <artifactId>sass-cli-maven-plugin</artifactId>
        <inherited>true</inherited>
        <configuration>
          <args>
            <arg>${basedir}/src/main/resources/org/apache/syncope/client/enduser/assets/css:${project.build.outputDirectory}/org/apache/syncope/client/enduser/assets/css</arg>
          </args>
        </configuration>
        <executions>
          <execution>
            <id>sass-compilation</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

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

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
      </plugin>
    </plugins>
    
    <resources>
      <resource>
        <directory>src/main/resources</directory>
        <filtering>true</filtering>
        <excludes>
          <exclude>org/apache/syncope/**/*.properties</exclude>
          <exclude>**/*.woff</exclude>
          <exclude>**/*.woff2</exclude>
        </excludes>
      </resource>
      <resource>
        <directory>src/main/resources</directory>
        <filtering>false</filtering>
        <includes>
          <include>org/apache/syncope/**/*.properties</include>
          <include>**/*.woff</include>
          <include>**/*.woff2</include>
        </includes>
      </resource>

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

      <resource>
        <directory>${basedir}</directory>
        <targetPath>META-INF</targetPath>
        <includes>
          <include>LICENSE</include>
          <include>NOTICE</include>
        </includes>
      </resource>
    </resources>
  </build>
  
  <profiles>
    <profile>
      <id>apache-release</id>

      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <inherited>false</inherited>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
                <configuration>
                  <includes>
                    <include>${basedir}/LICENSE</include>
                    <include>${basedir}/NOTICE</include>
                  </includes>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>debug</id>

      <properties>
        <maven.build.cache.skipCache>true</maven.build.cache.skipCache>
        <skipTests>true</skipTests>
      </properties>

      <build>
        <defaultGoal>clean package</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
                -Dwicket.core.settings.general.configuration-type=development
                -XX:+AllowEnhancedClassRedefinition -XX:HotswapAgent=fatjar
                -Xdebug -Xrunjdwp:transport=dt_socket,address=8004,server=y,suspend=n
              </jvmArguments>
              <profiles>
                <profile>debug</profile>
              </profiles>
            </configuration>
            <executions>
              <execution>
                <phase>package</phase>
                <goals>
                  <goal>run</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>

        <resources>
          <resource>
            <directory>${basedir}/src/test/resources</directory>
            <filtering>true</filtering>
            <includes>
              <include>*.properties</include>
            </includes>
          </resource>
        </resources>
      </build>
      
      <dependencies>
        <dependency>
          <groupId>org.apache.syncope.common.keymaster.self</groupId>
          <artifactId>syncope-common-keymaster-client-self</artifactId>
          <version>${project.version}</version>
        </dependency>

        <dependency>
          <groupId>org.apache.syncope.client.am</groupId>
          <artifactId>syncope-client-am-enduser</artifactId>
          <version>${project.version}</version>
        </dependency>

        <dependency>
          <groupId>org.apache.syncope.ext.flowable</groupId>
          <artifactId>syncope-ext-flowable-client-enduser</artifactId>
          <version>${project.version}</version>
        </dependency>

        <dependency>
          <groupId>org.apache.syncope.ext.saml2sp4ui</groupId>
          <artifactId>syncope-ext-saml2sp4ui-client-enduser</artifactId>
          <version>${project.version}</version>
        </dependency>

        <dependency>
          <groupId>org.apache.syncope.ext.oidcc4ui</groupId>
          <artifactId>syncope-ext-oidcc4ui-client-enduser</artifactId>
          <version>${project.version}</version>
        </dependency>
      </dependencies>
    </profile>
  </profiles>
</project>
