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

  <groupId>software.coolstuff</groupId>
  <artifactId>owncloud-spring-boot-starter</artifactId>
  <version>1.5.0</version>

  <name>owncloud-spring-boot-starter</name>
  <description>Spring Boot Owncloud Service and Authentication Provider</description>
  <url>https://github.com/coolstuffsoftware/springOwncloud</url>

  <inceptionYear>2016</inceptionYear>

  <organization>
    <name>coolstuff.software</name>
    <url>http://github.coolstuff.software</url>
  </organization>

  <developers>
    <developer>
      <id>mufasa1976</id>
      <name>Mufasa1976</name>
      <url>http://mufasa1976.github.io</url>
      <organization>coolstuff.software</organization>
      <roles>
        <role>Developer</role>
      </roles>
    </developer>
    <developer>
      <id>guillermoherrero</id>
      <name>Guillermo Herrero</name>
      <url>http://guillermoherrero.github.io</url>
      <organization>beyond coding</organization>
      <organizationUrl>http://www.beyond-coding.com</organizationUrl>
      <roles>
        <role>Developer</role>
      </roles>
    </developer>
  </developers>

  <licenses>
    <license>
      <name>GNU General Public License (GPL)</name>
      <url>http://www.gnu.org/licenses/gpl.txt</url>
    </license>
  </licenses>

  <scm>
    <url>https://github.com/coolstuffsoftware/owncloud-spring-boot-starter</url>
    <connection>scm:git:git://github.com/coolstuffsoftware/owncloud-spring-boot-starter.git</connection>
    <developerConnection>scm:git:git@github.com:coolstuffsoftware/owncloud-spring-boot-starter.git</developerConnection>
  </scm>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <java.version>1.8</java.version>
    <maven.compiler.source>${java.version}</maven.compiler.source>
    <maven.compiler.compilerVersion>${maven.compiler.source}</maven.compiler.compilerVersion>
    <maven.compiler.target>${java.version}</maven.compiler.target>

    <!-- Dependency Versions -->
    <spring-boot.version>2.2.6.RELEASE</spring-boot.version>
    <commons-lang3.version>3.7</commons-lang3.version>
    <guava.version>28.2-jre</guava.version>
    <commons-io.version>2.6</commons-io.version>
    <commons-collections4.version>4.1</commons-collections4.version>
    <sardine.version>5.9</sardine.version>
    <xmlunit.version>2.6.0</xmlunit.version>
    <lombok-plugin.version>1.18.12.0</lombok-plugin.version>
    <velocity.version>1.7</velocity.version>
    <velocity-tools.version>2.0</velocity-tools.version>

    <!-- Javadoc Properties -->
    <author>false</author>
    <show>public</show>

    <!-- AsciiDoctor Properties -->
    <asciidoctor.backend>html</asciidoctor.backend>
    <asciidoctor.sourceHighlighter>coderay</asciidoctor.sourceHighlighter>
    <asciidoctor.preserveDirectories>true</asciidoctor.preserveDirectories>
    <asciidoctor.graphvizdot>/usr/local/bin/dot</asciidoctor.graphvizdot>
  </properties>

  <dependencyManagement>
    <dependencies>
      <!-- Spring Boot BOM -->
      <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-dependencies</artifactId>
        <version>${spring-boot.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>

      <!-- Apache Commons -->
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-lang3</artifactId>
        <version>${commons-lang3.version}</version>
      </dependency>
      <dependency>
        <groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>${commons-io.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-collections4</artifactId>
        <version>${commons-collections4.version}</version>
      </dependency>

      <!-- Apache Velocity -->
      <dependency>
        <groupId>org.apache.velocity</groupId>
        <artifactId>velocity</artifactId>
        <version>${velocity.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.velocity</groupId>
        <artifactId>velocity-tools</artifactId>
        <version>${velocity-tools.version}</version>
      </dependency>

      <!-- Sardine WebDAV Library -->
      <dependency>
        <groupId>com.github.lookfirst</groupId>
        <artifactId>sardine</artifactId>
        <version>${sardine.version}</version>
      </dependency>

      <!-- Google Guava -->
      <dependency>
        <groupId>com.google.guava</groupId>
        <artifactId>guava</artifactId>
        <version>${guava.version}</version>
      </dependency>

      <!-- XMLUnit -->
      <dependency>
        <groupId>org.xmlunit</groupId>
        <artifactId>xmlunit-core</artifactId>
        <version>${xmlunit.version}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>
    <!-- Compile Dependencies -->

    <!-- Spring Boot -->
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-web</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-security</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-aop</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-validation</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-configuration-processor</artifactId>
      <optional>true</optional>
    </dependency>

    <!-- Apache Commons -->
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-lang3</artifactId>
    </dependency>
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-collections4</artifactId>
    </dependency>

    <!-- Sardine WebDAV Library -->
    <dependency>
      <groupId>com.github.lookfirst</groupId>
      <artifactId>sardine</artifactId>
    </dependency>

    <!-- Google Guava -->
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
    </dependency>

    <!-- Jackson Dataformat -->
    <dependency>
      <groupId>com.fasterxml.jackson.dataformat</groupId>
      <artifactId>jackson-dataformat-xml</artifactId>
    </dependency>

    <!-- Provided Dependencies -->

    <!-- Lombok -->
    <dependency>
      <groupId>org.projectlombok</groupId>
      <artifactId>lombok</artifactId>
      <scope>provided</scope>
    </dependency>

    <!-- Test Dependencies -->

    <!-- Spring Boot -->
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-test</artifactId>
      <scope>test</scope>
    </dependency>

    <!-- Spring Security -->
    <dependency>
      <groupId>org.springframework.security</groupId>
      <artifactId>spring-security-test</artifactId>
      <scope>test</scope>
    </dependency>

    <!-- XMLUnit -->
    <dependency>
      <groupId>org.xmlunit</groupId>
      <artifactId>xmlunit-core</artifactId>
      <scope>test</scope>
    </dependency>

    <!-- Apache Velocity -->
    <dependency>
      <groupId>org.apache.velocity</groupId>
      <artifactId>velocity</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.velocity</groupId>
      <artifactId>velocity-tools</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <pluginManagement>
      <plugins>
        <!-- Lombok -->
        <plugin>
          <groupId>org.projectlombok</groupId>
          <artifactId>lombok-maven-plugin</artifactId>
          <version>${lombok-plugin.version}</version>
          <configuration>
            <addOutputDirectory>false</addOutputDirectory>
            <sourceDirectory>${project.basedir}/src/main/java</sourceDirectory>
          </configuration>
        </plugin>

        <!-- JaCoCo -->
        <plugin>
          <groupId>org.jacoco</groupId>
          <artifactId>jacoco-maven-plugin</artifactId>
          <version>0.8.0</version>
          <configuration>
            <excludes>
              <exclude>software/coolstuff/springframework/owncloud/service/impl/OwncloudResourceService$OwncloudResourceData*.class</exclude>
              <exclude>software/coolstuff/springframework/owncloud/service/impl/Ocs*.class</exclude>
              <exclude>software/coolstuff/springframework/owncloud/properties/OwncloudProperties.class</exclude>
            </excludes>
          </configuration>
          <executions>
            <execution>
              <id>pre-unit-test</id>
              <goals>
                <goal>prepare-agent</goal>
              </goals>
            </execution>
            <execution>
              <id>post-unit-test</id>
              <phase>test</phase>
              <goals>
                <goal>report</goal>
              </goals>
            </execution>
          </executions>
        </plugin>

        <!-- AsciiDoctor -->
        <plugin>
          <groupId>org.asciidoctor</groupId>
          <artifactId>asciidoctor-maven-plugin</artifactId>
          <version>1.5.6</version>
          <dependencies>
            <dependency>
              <groupId>org.jruby</groupId>
              <artifactId>jruby-complete</artifactId>
              <version>1.7.27</version>
            </dependency>
            <dependency>
              <groupId>org.asciidoctor</groupId>
              <artifactId>asciidoctorj</artifactId>
              <version>1.5.6</version>
            </dependency>
            <dependency>
              <groupId>org.asciidoctor</groupId>
              <artifactId>asciidoctorj-diagram</artifactId>
              <version>1.5.8</version>
            </dependency>
          </dependencies>
          <configuration>
            <requires>
              <require>asciidoctor-diagram</require>
            </requires>
            <attributes>
              <graphvizdot>${asciidoctor.graphvizdot}</graphvizdot>
              <revnumber>${project.version}</revnumber>
              <organization>${project.organization.name}</organization>
            </attributes>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>license-maven-plugin</artifactId>
          <version>1.14</version>
        </plugin>

        <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself. -->
        <plugin>
          <groupId>org.eclipse.m2e</groupId>
          <artifactId>lifecycle-mapping</artifactId>
          <version>1.0.0</version>
          <configuration>
            <lifecycleMappingMetadata>
              <pluginExecutions>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.asciidoctor</groupId>
                    <artifactId>asciidoctor-maven-plugin</artifactId>
                    <versionRange>[1.5.6,)</versionRange>
                    <goals>
                      <goal>process-asciidoc</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>
      <!-- Maven Plugins of Apache Group -->
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.6.0</version>
      </plugin>

      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <version>3.0.2</version>
        <configuration>
          <archive>
            <manifest>
              <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
              <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
            </manifest>
          </archive>
        </configuration>
      </plugin>

      <plugin>
        <artifactId>maven-source-plugin</artifactId>
        <version>3.0.1</version>
      </plugin>

      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.10.4</version>
        <configuration>
          <defaultVersion>${project.version}</defaultVersion>
          <sourcepath>${project.build.directory}/delombok</sourcepath>
          <sourceFileExcludes>
            <sourceFileExclude>**/impl/**/*Impl.java</sourceFileExclude>
            <sourceFileExclude>**/impl/rest/Ocs.java</sourceFileExclude>
            <sourceFileExclude>**/impl/rest/OwncloudRestUserDetailsService.java</sourceFileExclude>
            <sourceFileExclude>**/*Configuration.java</sourceFileExclude>
            <sourceFileExclude>**/OwncloudAuthenticationTypeChecker.java</sourceFileExclude>
          </sourceFileExcludes>
        </configuration>
      </plugin>

      <plugin>
        <artifactId>maven-deploy-plugin</artifactId>
        <version>2.8.2</version>
      </plugin>

      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.19.1</version>
        <configuration>
          <forkCount>1</forkCount>
          <reuseForks>false</reuseForks>
        </configuration>
      </plugin>

      <plugin>
        <artifactId>maven-eclipse-plugin</artifactId>
        <version>2.10</version>
        <configuration>
          <projectNameTemplate>[groupId].[artifactId]</projectNameTemplate>
          <downloadSources>true</downloadSources>
          <downloadJavadocs>true</downloadJavadocs>
        </configuration>
      </plugin>

      <!-- Lombok -->
      <plugin>
        <groupId>org.projectlombok</groupId>
        <artifactId>lombok-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>delombok</id>
            <goals>
              <goal>delombok</goal>
            </goals>
            <configuration>
              <outputDirectory>${project.build.directory}/delombok</outputDirectory>
              <formatPreferences>
                <indent>2</indent>
                <constructorProperties>skip</constructorProperties>
                <generated>skip</generated>
                <generateDelombokComment>skip</generateDelombokComment>
                <suppressWarnings>skip</suppressWarnings>
              </formatPreferences>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <!-- JaCoCo -->
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
      </plugin>

      <!-- Atlassian Plugins -->
      <plugin>
        <groupId>external.atlassian.jgitflow</groupId>
        <artifactId>jgitflow-maven-plugin</artifactId>
        <version>1.0-m5.1</version>
        <dependencies>
          <dependency>
            <groupId>com.jcraft</groupId>
            <artifactId>jsch</artifactId>
            <version>0.1.54</version>
          </dependency>
        </dependencies>
        <configuration>
          <flowInitContext>
            <versionTagPrefix>release-</versionTagPrefix>
          </flowInitContext>
          <scmCommentPrefix>[jgitflow plugin]</scmCommentPrefix>
          <pushReleases>true</pushReleases>
          <pushFeatures>true</pushFeatures>
          <pushHotfixes>true</pushHotfixes>
        </configuration>
      </plugin>

      <!-- License Maven Plugin -->
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>license-maven-plugin</artifactId>
        <configuration>
          <licenseName>gpl_v3</licenseName>
          <addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
          <organizationName>by the original Authors</organizationName>
          <roots>src/main/java, src/test/java, target/generated-sources, target/processed-sources</roots>
        </configuration>
        <executions>
          <execution>
            <phase>validate</phase>
            <goals>
              <goal>check-file-header</goal>
            </goals>
            <configuration>
              <failOnMissingHeader>true</failOnMissingHeader>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <reporting>
    <plugins>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
      </plugin>
    </plugins>
  </reporting>

  <distributionManagement>
    <snapshotRepository>
      <id>snapshots.sonatype.org</id>
      <name>Coolstuff Software Snapshots</name>
      <uniqueVersion>false</uniqueVersion>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
    <downloadUrl>https://oss.sonatype.org/content/groups/public</downloadUrl>
  </distributionManagement>

  <profiles>
    <profile>
      <id>disable-java8-doclint</id>
      <activation>
        <jdk>[1.8,)</jdk>
      </activation>
      <properties>
        <additionalparam>-Xdoclint:none</additionalparam>
      </properties>
    </profile>

    <profile>
      <id>release-profile</id>

      <activation>
        <property>
          <name>performRelease</name>
        </property>
      </activation>

      <distributionManagement>
        <repository>
          <id>releases.sonatype.org</id>
          <name>Coolstuff Software Releases</name>
          <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
        </repository>
      </distributionManagement>

      <build>
        <plugins>
          <plugin>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <environmentVariables>
                <testChecksumService>true</testChecksumService>
              </environmentVariables>
            </configuration>
          </plugin>

          <plugin>
            <artifactId>maven-clean-plugin</artifactId>
            <version>2.6.1</version>
            <executions>
              <execution>
                <id>clean-docs</id>
                <phase>generate-resources</phase>
                <goals>
                  <goal>clean</goal>
                </goals>
                <configuration>
                  <excludeDefaultDirectories>true</excludeDefaultDirectories>
                  <filesets>
                    <fileset>
                      <directory>docs</directory>
                    </fileset>
                  </filesets>
                </configuration>
              </execution>
            </executions>
          </plugin>

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

          <plugin>
            <groupId>org.asciidoctor</groupId>
            <artifactId>asciidoctor-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>asciidoctor</id>
                <phase>generate-resources</phase>
                <goals>
                  <goal>process-asciidoc</goal>
                </goals>
                <configuration>
                  <outputDirectory>${project.basedir}/docs</outputDirectory>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>checkin-docs-to-scm</id>

      <activation>
        <property>
          <name>performRelease</name>
        </property>
      </activation>

      <build>
        <plugins>
          <plugin>
            <artifactId>maven-scm-plugin</artifactId>
            <version>1.9.5</version>
            <executions>
              <execution>
                <id>add-generated-docs</id>
                <phase>generate-resources</phase>
                <goals>
                  <goal>add</goal>
                </goals>
                <configuration>
                  <includes>docs/**/*</includes>
                </configuration>
              </execution>
              <execution>
                <id>checkin-docs</id>
                <phase>process-resources</phase>
                <goals>
                  <goal>checkin</goal>
                </goals>
                <configuration>
                  <message>[maven-scm-plugin] added generated documentation</message>
                  <pushChanges>false</pushChanges>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>asciidoctor-mac</id>

      <activation>
        <os>
          <family>mac</family>
        </os>
      </activation>

      <properties>
        <asciidoctor.graphvizdot>/usr/local/bin/dot</asciidoctor.graphvizdot>
      </properties>
    </profile>
  </profiles>
</project>
