<?xml version="1.0" encoding="UTF-8"?>
<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.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.5.7</version>
    <relativePath />
  </parent>
  <groupId>ee.datel</groupId>
  <artifactId>dogis6-parent</artifactId>
  <version>4.4.2</version> <!-- dogis6.version -->
  <packaging>pom</packaging>
  <properties>
    <java.version>11</java.version>
    <dogis6.version>4.4.2</dogis6.version>
    <guava.version>30.1.1-jre</guava.version>
    <commons-text.version>1.9</commons-text.version>
    <commons-io.version>2.8.0</commons-io.version>
    <owasp.encoder.version>1.2.3</owasp.encoder.version>
    <jackson-datatype-jts.version>1.0-2.7</jackson-datatype-jts.version>

    <jacoco-maven-plugin.version>0.8.7</jacoco-maven-plugin.version>
    <owasp.dependency-check-maven.version>6.2.2</owasp.dependency-check-maven.version>
    <maven-resources-plugin.version>3.2.0</maven-resources-plugin.version>
    <license-maven-plugin.version>2.0.0</license-maven-plugin.version>

    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <!-- -->
    <timestamp>${maven.build.timestamp}</timestamp>
    <maven.build.timestamp.format>yyyy-MM-dd'T'HH-mm</maven.build.timestamp.format>
    <!-- -->
    <dev.basedir />
    <!-- -->
    <application.config.location>./etc/dogis6/</application.config.location>
    <!-- -->
    <license.licenseName>datel</license.licenseName>
    <license.licenseResolver>${project.baseUri}/../license</license.licenseResolver>
  </properties>
  <name>${project.groupId}:${project.artifactId}</name>
  <description>Library for DoGIS6 Backend Services - Parent</description>
  <inceptionYear>2018</inceptionYear>
  <url>https://www.datel.eu/en/</url>
  <organization>
    <name>AS Datel</name>
    <url>https://www.datel.eu/en/</url>
  </organization>
  <licenses>
    <license>
      <name>Free Binary Use License</name>
      <comments><![CDATA[
Copyright (C) 2018 - 2021 AS Datel <licenses@datel.ee>

Redistribution and use in binary form, without modification, are permitted
provided that the following conditions are met:
                          
1. Redistributions in must reproduce the above copyright notice, this list of
conditions and the following disclaimer in the documentation and/or other
materials provided with the distribution.

2. Neither the name of the copyright holder nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
      ]]></comments>
    </license>
  </licenses>
  <developers>
    <developer>
      <organization>AS Datel</organization>
      <email>licenses@datel.ee</email>
      <organizationUrl>https://www.datel.eu/en/</organizationUrl>
    </developer>
  </developers>
  <scm>
    <connection>scm:svn:https://tarkvara.datel.ee/bitbucket/scm/dgs6/dogis6-parent.git</connection>
    <url>https://tarkvara.datel.ee/bitbucket/projects/DGS6/repos/dogis6-parent/browse</url>
  </scm>


  <profiles>
    <profile>
      <id>dev</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <dependencies>
        <dependency>
          <groupId>org.springframework.boot</groupId>
          <artifactId>spring-boot-properties-migrator</artifactId>
          <scope>runtime</scope>
        </dependency>
      </dependencies>
    </profile>
    <profile>
      <id>owasp</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.owasp</groupId>
            <artifactId>dependency-check-maven</artifactId>
            <version>${owasp.dependency-check-maven.version}</version>
            <configuration>
              <failBuildOnCVSS>9</failBuildOnCVSS>
            </configuration>
            <executions>
              <execution>
                <goals>
                  <goal>check</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>deploy</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
          </plugin>
        </plugins>
        <pluginManagement>
          <plugins>
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-javadoc-plugin</artifactId>
              <executions>
                <execution>
                  <id>attach-javadocs</id>
                  <goals>
                    <goal>jar</goal>
                  </goals>
                </execution>
              </executions>
              <configuration>
                <show>public</show>
                <encoding>UTF-8</encoding>
              </configuration>
            </plugin>
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-resources-plugin</artifactId>
              <version>${maven-resources-plugin.version}</version>
              <configuration>
                <nonFilteredFileExtensions>
                  <nonFilteredFileExtension>pdf</nonFilteredFileExtension>
                  <nonFilteredFileExtension>zip</nonFilteredFileExtension>
                  <nonFilteredFileExtension>eot</nonFilteredFileExtension>
                  <nonFilteredFileExtension>svg</nonFilteredFileExtension>
                  <nonFilteredFileExtension>ttf</nonFilteredFileExtension>
                  <nonFilteredFileExtension>woff</nonFilteredFileExtension>
                  <nonFilteredFileExtension>woff2</nonFilteredFileExtension>
                  <nonFilteredFileExtension>otf</nonFilteredFileExtension>
                  <nonFilteredFileExtension>gz</nonFilteredFileExtension>
                </nonFilteredFileExtensions>
                <propertiesEncoding>UTF-8</propertiesEncoding>
              </configuration>
              <executions>
                <execution>
                  <id>copy-resources</id>
                  <phase>validate</phase>
                  <goals>
                    <goal>copy-resources</goal>
                  </goals>
                  <configuration>
                    <outputDirectory>${basedir}/target/extra-resources</outputDirectory>
                    <resources>
                      <resource>
                        <directory>../license/datel</directory>
                        <targetPath>../generated-sources/annotations</targetPath>
                        <filtering>false</filtering>
                        <includes>
                          <include>source.txt</include>
                        </includes>
                      </resource>
                    </resources>
                  </configuration>
                </execution>
              </executions>
            </plugin>
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-source-plugin</artifactId>
              <executions>
                <execution>
                  <id>attach-sources</id>
                  <phase>package</phase>
                  <goals>
                    <goal>jar-no-fork</goal>
                  </goals>
                </execution>
              </executions>
              <configuration>
                <archive>
                  <addMavenDescriptor>false</addMavenDescriptor>
                </archive>
                <useDefaultManifestFile>true</useDefaultManifestFile>
                <excludeResources>true</excludeResources>
                <includePom>false</includePom>
                <forceCreation>true</forceCreation>
                <includes>
                  <include>source.txt</include>
                </includes>
                <excludes>
                  <exclude>ee/**</exclude>
                </excludes>
              </configuration>
            </plugin>
            <plugin>
              <groupId>org.codehaus.mojo</groupId>
              <artifactId>license-maven-plugin</artifactId>
              <version>${license-maven-plugin.version}</version>
              <configuration>
                <organizationName>AS Datel &lt;licenses@datel.ee&gt;</organizationName>
                <inceptionYear>${project.inceptionYear}</inceptionYear>
                <encoding>UTF-8</encoding>
                <licenseName>datel</licenseName>
                <includeTransitiveDependencies>true</includeTransitiveDependencies>
                <addJavaLicenseAfterPackage>true</addJavaLicenseAfterPackage>
                <canUpdateCopyright>true</canUpdateCopyright>
                <canUpdateDescription>true</canUpdateDescription>
                <canUpdateLicense>true</canUpdateLicense>
                <trimHeaderLine>true</trimHeaderLine>
                <verbose>false</verbose>
                <includes>
                  <includes>**/*.java</includes>
                </includes>
              </configuration>
              <executions>
                <execution>
                  <id>first</id>
                  <goals>
                    <goal>update-file-header</goal>
                  </goals>
                  <phase>process-sources</phase>
                  <configuration>
                    <processStartTag>==========================LICENSE_START===================================</processStartTag>
                    <sectionDelimiter> </sectionDelimiter>
                    <processEndTag>===========================LICENSE_END====================================</processEndTag>
                    <roots>
                      <root>src/main/java</root>
                      <root>src/test/java</root>
                    </roots>
                  </configuration>
                </execution>
                <execution>
                  <id>second</id>
                  <goals>
                    <goal>update-project-license</goal>
                  </goals>
                  <phase>generate-sources</phase>
                </execution>
              </executions>
            </plugin>
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-gpg-plugin</artifactId>
              <version>1.6</version>
              <executions>
                <execution>
                  <id>sign-artifacts</id>
                  <phase>verify</phase>
                  <goals>
                    <goal>sign</goal>
                  </goals>
                </execution>
              </executions>
            </plugin>
          </plugins>
        </pluginManagement>
      </build>
      <distributionManagement>
        <repository>
          <id>ossrh</id>
          <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
        </repository>
      </distributionManagement>
    </profile>
    <profile>
      <id>local</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
      <distributionManagement>
        <repository>
          <uniqueVersion>false</uniqueVersion>
          <id>datel-libs-artifactory</id>
          <url>http://artifactory.datel.ee/artifactory/libs-release-local</url>
        </repository>
      </distributionManagement>
    </profile>
  </profiles>
  <dependencies>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-web</artifactId>
      <exclusions>
        <exclusion>
          <groupId>org.springframework.boot</groupId>
          <artifactId>spring-boot-starter-tomcat</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-validation</artifactId>
    </dependency>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>javax.servlet-api</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-cache</artifactId>
    </dependency>
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
      <version>${guava.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-text</artifactId>
      <version>${commons-text.version}</version>
    </dependency>
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <version>${commons-io.version}</version>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.dataformat</groupId>
      <artifactId>jackson-dataformat-xml</artifactId>
    </dependency>
    <dependency>
      <groupId>org.owasp.encoder</groupId>
      <artifactId>encoder</artifactId>
      <version>${owasp.encoder.version}</version>
    </dependency>
    <!-- JAVA 11 -->
    <dependency>
      <groupId>org.glassfish.jaxb</groupId>
      <artifactId>jaxb-runtime</artifactId>
    </dependency>

    <!-- TEST -->
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-test</artifactId>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <groupId>org.junit.vintage</groupId>
          <artifactId>junit-vintage-engine</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>com.graphhopper.external</groupId>
        <artifactId>jackson-datatype-jts</artifactId>
        <version>${jackson-datatype-jts.version}</version>
      </dependency>
      <dependency>
        <groupId>org.gdal</groupId>
        <artifactId>gdal</artifactId>
        <version>3.3.0</version>
      </dependency>
      <dependency>
        <groupId>ee.datel</groupId>
        <artifactId>dogis6-base</artifactId>
        <version>${dogis6.version}</version>
      </dependency>
      <dependency>
        <groupId>ee.datel</groupId>
        <artifactId>dogis6-common</artifactId>
        <version>${dogis6.version}</version>
      </dependency>
      <dependency>
        <groupId>ee.datel</groupId>
        <artifactId>dogis6-admin</artifactId>
        <version>${dogis6.version}</version>
      </dependency>
      <dependency>
        <groupId>ee.datel</groupId>
        <artifactId>dogis6-proxy</artifactId>
        <version>${dogis6.version}</version>
      </dependency>
      <dependency>
        <groupId>ee.datel</groupId>
        <artifactId>dogis6-cluster</artifactId>
        <version>${dogis6.version}</version>
      </dependency>
      <dependency>
        <groupId>ee.datel</groupId>
        <artifactId>dogis6-cloud</artifactId>
        <version>${dogis6.version}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <build>
    <resources>
      <resource>
        <directory>${basedir}/src/main/resources</directory>
        <filtering>false</filtering>
        <excludes>
          <exclude>**/*.properties</exclude>
          <exclude>**/*.xml</exclude>
        </excludes>
      </resource>
      <resource>
        <directory>${basedir}/src/main/resources</directory>
        <filtering>true</filtering>
        <includes>
          <include>**/*.properties</include>
          <include>**/*.xml</include>
        </includes>
      </resource>
      <resource>
        <directory>${basedir}/version</directory>
      </resource>
    </resources>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <configuration>
            <nonFilteredFileExtensions>
              <nonFilteredFileExtension>pdf</nonFilteredFileExtension>
              <nonFilteredFileExtension>zip</nonFilteredFileExtension>
              <nonFilteredFileExtension>eot</nonFilteredFileExtension>
              <nonFilteredFileExtension>svg</nonFilteredFileExtension>
              <nonFilteredFileExtension>ttf</nonFilteredFileExtension>
              <nonFilteredFileExtension>woff</nonFilteredFileExtension>
              <nonFilteredFileExtension>woff2</nonFilteredFileExtension>
              <nonFilteredFileExtension>otf</nonFilteredFileExtension>
              <nonFilteredFileExtension>gz</nonFilteredFileExtension>
            </nonFilteredFileExtensions>
            <propertiesEncoding>UTF-8</propertiesEncoding>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <configuration>
            <optimize>true</optimize>
            <debug>true</debug>
            <encoding>UTF-8</encoding>
            <compilerArgs>
              <arg>-Xlint:deprecation</arg>
            </compilerArgs>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-war-plugin</artifactId>
          <configuration>
            <packagingExcludes>**/logback-stdout.xml,
              WEB-INF/lib/commons-logging-*.jar,
              %regex[WEB-INF/lib/log4j-(?!over-slf4j).*.jar]
            </packagingExcludes>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <addMavenDescriptor>false</addMavenDescriptor>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <forkedProcessExitTimeoutInSeconds>5</forkedProcessExitTimeoutInSeconds>
          <forkedProcessTimeoutInSeconds>120</forkedProcessTimeoutInSeconds>
          <redirectTestOutputToFile>true</redirectTestOutputToFile>
          <forkCount>1</forkCount>
          <forkMode>once</forkMode>
          <threadCount>1</threadCount>
          <useUnlimitedThreads>false</useUnlimitedThreads>
          <reuseForks>true</reuseForks>
          <argLine>${argLine} -Xmx1024m -Xms1024m</argLine>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>${jacoco-maven-plugin.version}</version>
        <executions>
          <execution>
            <id>default-prepare-agent</id>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
          <execution>
            <id>default-report</id>
            <goals>
              <goal>report</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.owasp</groupId>
        <artifactId>dependency-check-maven</artifactId>
        <reportSets>
          <reportSet>
            <reports>
              <report>aggregate</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>${jacoco-maven-plugin.version}</version>
        <reportSets>
          <reportSet>
            <reports>
              <report>report</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
    </plugins>
  </reporting>
  <modules>
    <module>dogis6-base</module>
    <module>dogis6-common</module>
    <module>dogis6-cluster</module>
    <module>dogis6-proxy</module>
    <module>dogis6-admin</module>
    <module>dogis6-cloud</module>
  </modules>
</project>