<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
 * Copyright (c) Codice Foundation
 *
 * This is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either
 * version 3 of the License, or any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU Lesser General Public License for more details. A copy of the GNU Lesser General Public License is distributed along with this program and can be found at
 * <http://www.gnu.org/licenses/lgpl.html>.
 *
 **/

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

  <name>DDF :: UI</name>
  <artifactId>catalog-ui</artifactId>
  <groupId>org.codice.ddf.search</groupId>
  <version>5.1.49</version>

  <organization>
    <name>Codice Foundation</name>
    <url>http://codice.org</url>
  </organization>

  <licenses>
    <license>
      <name>GNU Lesser General Public v3</name>
      <url>http://www.gnu.org/licenses/lgpl.html</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <packaging>pom</packaging>

  <modules>
    <module>ui-backend</module>
    <module>ui-frontend</module>
    <module>docs</module>
  </modules>

  <properties>
    <!--Project properties-->
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
    <compiler.fork>false</compiler.fork>
    <maven.deploy.plugin.version>2.8.2</maven.deploy.plugin.version>
    <maven.release.plugin.version>3.0.0-M1</maven.release.plugin.version>
    <javalin.thirdparty.bundle.version>3.11.2_1</javalin.thirdparty.bundle.version>
    <kotlin-osgi.version>1.3.71</kotlin-osgi.version>
    <maven-jar-plugin.version>3.0.2</maven-jar-plugin.version>
    <errorprone.version>2.2.0</errorprone.version>

    <!--Backend properties-->
    <ddf.version>2.26.46</ddf.version>
    <ddf-jsonrpc.version>0.6</ddf-jsonrpc.version>
    <ddf.support.version>2.3.16</ddf.support.version>
    <antlr.version>4.3</antlr.version>
    <c3p0.version>0.9.5.5</c3p0.version>
    <camel.version>3.4.0</camel.version>
    <commons-collections.version>3.2.2</commons-collections.version>
    <commons-lang.version>2.6</commons-lang.version>
    <commons-lang3.version>3.11</commons-lang3.version>
    <commons-math3.version>3.6.1</commons-math3.version>
    <gson.version>2.8.5</gson.version>
    <guava.version>29.0-jre</guava.version>
    <httpclient.version>4.5.12</httpclient.version>
    <httpcore.version>4.4.13</httpcore.version>
    <jackson.version>2.11.0</jackson.version>
    <javax.servlet-api.version>3.1.0</javax.servlet-api.version>
    <javax.ws.rs.version>2.1</javax.ws.rs.version>
    <jaxb.version>2.3.2</jaxb.version>
    <jsr305.version>3.0.2</jsr305.version>
    <jvnet.jaxb2.version>0.11.0</jvnet.jaxb2.version>
    <jvnet-ogc.version>2.6.1</jvnet-ogc.version>
    <karaf.version>4.2.9</karaf.version>
    <nimbus.version>8.14.1</nimbus.version>
    <nimbus.oidc.version>8.3</nimbus.oidc.version>
    <org.geotools.version>20.1</org.geotools.version>
    <org.geotools.bundle.version>${org.geotools.version}_2</org.geotools.bundle.version>
    <osgi.version>5.0.0</osgi.version>
    <owasp-html-sanitizer.version>20191001.1</owasp-html-sanitizer.version>
    <ows-v_1_0_0-schema.version>1.1.0</ows-v_1_0_0-schema.version>
    <pac4j.version>4.0.1</pac4j.version>
    <pax.web.jsp.version>7.2.18</pax.web.jsp.version>
    <quartz.version>2.3.2</quartz.version>
    <spark.version>2.9.2</spark.version>
    <spatial4j.version>0.7</spatial4j.version>
    <tika.version>1.24.1</tika.version>
    <usng4j.version>0.4</usng4j.version>
    <org.slf4j.version>1.7.29</org.slf4j.version>

    <!-- Command line argument properties for the maven-surefire-plugin -->
    <codice-test.version>0.3</codice-test.version>
    <codice-maven.version>0.3</codice-maven.version>

    <!--Test properties-->
    <hamcrest-junit.version>2.0.0.0</hamcrest-junit.version>
    <hamcrest-all.version>1.3</hamcrest-all.version>
    <junit.version>4.12</junit.version>
    <mockito.version>2.8.47</mockito.version>
    <objenesis.version>2.6</objenesis.version>
    <xmlunit.version>1.4</xmlunit.version>

    <!--Frontend properties-->
    <backbone.modelbinder.version>1.1.0</backbone.modelbinder.version>
    <html5shiv.version>3.7.2</html5shiv.version>
    <iframe-resizer.version>2.6.2</iframe-resizer.version>
    <jknack.handlebars.version>2.0.0</jknack.handlebars.version>
    <marionette.version>2.4.5</marionette.version>
    <moment.version>2.20.1</moment.version>
    <node.version>v16.16.0</node.version>
    <picocontainer.version>1.3_1</picocontainer.version>
    <underscore.version>1.8.3</underscore.version>
    <yarn.version>v1.22.4</yarn.version>

    <project.report.output.directory>project-info</project.report.output.directory>
  </properties>

  <scm>
    <url>https://github.com/codice/ddf-ui</url>
    <connection>scm:git:https://github.com/codice/ddf-ui.git</connection>
    <developerConnection>scm:git:https://github.com/codice/ddf-ui.git</developerConnection>
    <tag>ddf-ui-5.1.49</tag>
  </scm>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>com.fasterxml.jackson</groupId>
        <artifactId>jackson-bom</artifactId>
        <version>${jackson.version}</version>
        <scope>import</scope>
        <type>pom</type>
      </dependency>
      <dependency>
        <groupId>org.glassfish.jaxb</groupId>
        <artifactId>jaxb-bom</artifactId>
        <version>${jaxb.version}</version>
        <scope>import</scope>
        <type>pom</type>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <distributionManagement>
    <snapshotRepository>
      <id>snapshots</id>
      <url>${snapshots.repository.url}</url>
    </snapshotRepository>
    <repository>
      <id>releases</id>
      <url>${releases.repository.url}</url>
    </repository>
    <site>
      <id>reports</id>
      <url>${reports.repository.url}</url>
    </site>
  </distributionManagement>
  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>${maven.deploy.plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <version>3.0.2</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.8.1</version>
          <configuration>
            <compilerId>javac-with-errorprone</compilerId>
            <forceJavacCompilerUse>true</forceJavacCompilerUse>
            <!-- maven-compiler-plugin defaults to targeting Java 5, but our javac
                    only supports >=6 -->
            <source>8</source>
            <target>8</target>
            <maxmem>512M</maxmem>
            <fork>${compiler.fork}</fork>
            <encoding>${project.build.sourceEncoding}</encoding>
          </configuration>
          <dependencies>
            <dependency>
              <groupId>org.codehaus.plexus</groupId>
              <artifactId>plexus-compiler-javac-errorprone</artifactId>
              <version>2.8.2</version>
            </dependency>
            <!-- override plexus-compiler-javac-errorprone's dependency on
                 Error Prone with the latest version -->
            <dependency>
              <groupId>com.google.errorprone</groupId>
              <artifactId>error_prone_core</artifactId>
              <version>2.1.2</version>
            </dependency>
          </dependencies>
        </plugin>
        <plugin>
          <groupId>org.apache.felix</groupId>
          <artifactId>maven-bundle-plugin</artifactId>
          <version>4.2.1</version>
          <extensions>true</extensions>
          <configuration>
            <!-- Disabled OBR to increase build speed -->
            <obrRepository>NONE</obrRepository>
            <instructions>
              <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
            </instructions>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>3.1.2</version>
          <configuration>
            <argLine>@{argLine} -Djava.awt.headless=true -noverify</argLine>
            <includes>
              <include>**/*Test.java</include>
              <include>**/*Spec.class</include>
            </includes>

          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-enforcer-plugin</artifactId>
          <version>1.4.1</version>
          <dependencies>
            <dependency>
              <groupId>ddf.support</groupId>
              <artifactId>artifact-size-enforcer</artifactId>
              <version>${ddf.support.version}</version>
            </dependency>
          </dependencies>
          <executions>
            <execution>
              <id>check-artifact-size</id>
              <phase>verify</phase>
              <goals>
                <goal>enforce</goal>
              </goals>
              <configuration>
                <rules>
                  <ArtifactSizeEnforcerRule implementation="org.codice.maven.artifactsize.ArtifactSizeEnforcerRule" />
                </rules>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.jacoco</groupId>
          <artifactId>jacoco-maven-plugin</artifactId>
          <version>0.8.10</version>
          <dependencies>
            <dependency>
              <groupId>org.codice.maven</groupId>
              <artifactId>jacoco</artifactId>
              <version>${codice-maven.version}</version>
            </dependency>
          </dependencies>
          <executions>
            <execution>
              <id>default-prepare-agent</id>
              <goals>
                <goal>prepare-agent</goal>
              </goals>
            </execution>
            <execution>
              <id>default-report</id>
              <phase>prepare-package</phase>
              <configuration>
                <outputDirectory>
                  ${project.build.directory}/site/${project.report.output.directory}/jacoco/
                </outputDirectory>
              </configuration>
              <goals>
                <goal>report</goal>
              </goals>
            </execution>
            <execution>
              <id>default-check</id>
              <goals>
                <goal>check</goal>
              </goals>
              <configuration>
                <haltOnFailure>true</haltOnFailure>
                <rules>
                  <rule>
                    <element>BUNDLE</element>
                    <limits>
                      <limit implementation="org.codice.jacoco.LenientLimit">
                        <counter>INSTRUCTION</counter>
                        <value>COVEREDRATIO</value>
                        <minimum>0.75</minimum>
                      </limit>
                      <limit implementation="org.codice.jacoco.LenientLimit">
                        <counter>BRANCH</counter>
                        <value>COVEREDRATIO</value>
                        <minimum>0.75</minimum>
                      </limit>
                      <limit implementation="org.codice.jacoco.LenientLimit">
                        <counter>COMPLEXITY</counter>
                        <value>COVEREDRATIO</value>
                        <minimum>0.75</minimum>
                      </limit>
                    </limits>
                  </rule>
                </rules>
              </configuration>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>
      <plugin>
        <groupId>com.coveo</groupId>
        <artifactId>fmt-maven-plugin</artifactId>
        <version>2.3.0</version>
        <!--        <version>2.9</version>-->
        <executions>
          <execution>
            <phase>validate</phase>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.gmavenplus</groupId>
        <artifactId>gmavenplus-plugin</artifactId>
        <version>1.5</version>
        <executions>
          <execution>
            <goals>
              <goal>compile</goal>
              <goal>testCompile</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>${maven.release.plugin.version}</version>
        <configuration>
          <autoVersionSubmodules>true</autoVersionSubmodules>
          <preparationGoals>clean install</preparationGoals>
          <pushChanges>false</pushChanges>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <repositories>
    <repository>
      <id>central</id>
      <name>Central Repository</name>
      <url>https://repo.maven.apache.org/maven2</url>
      <layout>default</layout>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </repository>
    <repository>
      <id>codice</id>
      <name>Codice Repository</name>
      <url>https://artifacts.codice.org/content/groups/public/</url>
    </repository>
  </repositories>
  <pluginRepositories>
    <pluginRepository>
      <id>central</id>
      <name>Central Repository</name>
      <url>https://repo.maven.apache.org/maven2</url>
      <layout>default</layout>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </pluginRepository>
    <pluginRepository>
      <id>codice</id>
      <name>Codice Repository</name>
      <url>https://artifacts.codice.org/content/groups/public/</url>
    </pluginRepository>
  </pluginRepositories>
  <dependencies>
    <dependency>
      <groupId>org.codice.test</groupId>
      <artifactId>spock-all</artifactId>
      <version>${codice-test.version}</version>
      <type>pom</type>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest-all</artifactId>
      <version>${hamcrest-all.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>${mockito.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.objenesis</groupId>
      <artifactId>objenesis</artifactId>
      <version>${objenesis.version}</version>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>${junit.version}</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <groupId>org.hamcrest</groupId>
          <artifactId>hamcrest-core</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>xmlunit</groupId>
      <artifactId>xmlunit</artifactId>
      <version>${xmlunit.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.codice.test</groupId>
      <artifactId>junit-extensions</artifactId>
      <version>${codice-test.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.codice.test</groupId>
      <artifactId>spock-extensions</artifactId>
      <version>${codice-test.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.codice.test</groupId>
      <artifactId>hamcrest-extensions</artifactId>
      <version>${codice-test.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.codice.test</groupId>
      <artifactId>mockito-extensions</artifactId>
      <version>${codice-test.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.codice.test</groupId>
      <artifactId>failsafe-controller</artifactId>
      <version>${codice-test.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
</project>
