<?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>3.0.1</version>
  </parent>

  <name>Apache Syncope Client IdRepo Console</name>
  <description>Apache Syncope Client IdRepo Console</description>
  <groupId>org.apache.syncope.client.idrepo</groupId>
  <artifactId>syncope-client-idrepo-console</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.wicket</groupId>
      <artifactId>wicket-auth-roles</artifactId>
    </dependency>

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

    <dependency>
      <groupId>com.nimbusds</groupId>
      <artifactId>nimbus-jose-jwt</artifactId>
    </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>bootbox</artifactId>
    </dependency>
    <dependency>
      <groupId>org.webjars</groupId>
      <artifactId>codemirror</artifactId>
    </dependency>
    <dependency>
      <groupId>org.webjars</groupId>
      <artifactId>google-diff-match-patch</artifactId>
    </dependency>
    <dependency>
      <groupId>org.webjars</groupId>
      <artifactId>jsplumb</artifactId>
    </dependency>
    <dependency>
      <groupId>org.webjars.bower</groupId>
      <artifactId>chart.js</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.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-slf4j-impl</artifactId>
    </dependency>
    <dependency>
      <groupId>com.lmax</groupId>
      <artifactId>disruptor</artifactId>
    </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>nl.geodienstencentrum.maven</groupId>
        <artifactId>sass-maven-plugin</artifactId>
        <inherited>true</inherited>
        <executions>
          <execution>
            <id>sass-compilation</id>
            <phase>compile</phase>
            <goals>
              <goal>update-stylesheets</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <resources>
            <resource>
              <source>
                <directory>${basedir}/src/main/resources/META-INF/resources/css</directory>
              </source>
              <destination>${project.build.outputDirectory}/META-INF/resources/css</destination>
            </resource>
          </resources>
          <skip>${sass.skip}</skip>
        </configuration>
      </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>
        <configuration>
          <systemProperties>
            <wicket.ioc.useByteBuddy>true</wicket.ioc.useByteBuddy>
          </systemProperties>
        </configuration>
      </plugin>
    </plugins>

    <resources>
      <resource>
        <directory>src/main/resources</directory>
        <filtering>true</filtering>
        <excludes>
          <exclude>org/apache/syncope/**/*.properties</exclude>
        </excludes>
      </resource>
      <resource>
        <directory>src/main/resources</directory>
        <filtering>false</filtering>
        <includes>
          <include>org/apache/syncope/**/*.properties</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>
        <skipTests>true</skipTests>
      </properties>

      <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
                -Dwicket.core.settings.general.configuration-type=development
                -XX:HotswapAgent=fatjar
                -Xdebug -Xrunjdwp:transport=dt_socket,address=8003,server=y,suspend=n
              </jvmArguments>
              <profiles>
                <profile>debug</profile>
              </profiles>
            </configuration>
          </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.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>org.apache.syncope.client.idm</groupId>
          <artifactId>syncope-client-idm-console</artifactId>
          <version>${project.version}</version>
        </dependency>
        <dependency>
          <groupId>org.apache.syncope.client.am</groupId>
          <artifactId>syncope-client-am-console</artifactId>
          <version>${project.version}</version>
        </dependency>

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

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

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