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

   <groupId>de.coderspack</groupId>
   <artifactId>spring-boot-starter-jwt</artifactId>
   <version>0.0.2</version>
   <packaging>pom</packaging>

   <name>spring-boot-starter-jwt</name>
   <description>Coders Pack Spring Boot JWT Starter</description>
   <url>http://www.coderspack.de</url>

   <modules>
      <module>jwt-spring-boot-library</module>
      <module>jwt-spring-boot-autoconfiguration</module>
      <module>jwt-spring-boot-starter</module>
   </modules>

   <licenses>
      <license>
         <name>MIT license</name>
         <url>http://www.opensource.org/licenses/mit-license.php</url>
      </license>
   </licenses>

   <developers>
      <developer>
         <name>Lars Michaelis</name>
         <email>mail@larmic.de</email>
      </developer>
      <developer>
         <name>Stephan Zerhusen</name>
         <email>stephan.zerhusen@gmail.com</email>
      </developer>
   </developers>

   <scm>
      <connection>scm:git:git://github.com/coderspack/jwt-spring-security-demo.git</connection>
      <url>https://github.com/coderspack/jwt-spring-security-demo</url>
      <developerConnection>scm:git:git@github.com:coderspack/jwt-spring-security-demo.git</developerConnection>
      <tag>spring-boot-starter-jwt-0.0.2</tag>
   </scm>

   <distributionManagement>
      <snapshotRepository>
         <id>sonatype-nexus-snapshots</id>
         <name>sonatype-nexus-snapshots</name>
         <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
      </snapshotRepository>
      <repository>
         <id>sonatype-nexus-staging</id>
         <name>sonatype-nexus-staging</name>
         <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
      </repository>
   </distributionManagement>

   <properties>
      <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
      <java.version>11</java.version>

      <spring-boot.version>2.2.1.RELEASE</spring-boot.version>

      <maven.min.version>3.2.1</maven.min.version>
      <maven.compiler.target>${java.version}</maven.compiler.target>
      <maven.compiler.source>${java.version}</maven.compiler.source>
      <maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>

      <!-- maven release to oss sonartype / maven central -->
      <maven-release-plugin.version>2.5.3</maven-release-plugin.version>
      <maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>

      <jjwt.version>0.10.6</jjwt.version>
      <validation-api.version>2.0.1.Final</validation-api.version>

      <!-- testing -->
      <junit-jupiter.version>5.5.2</junit-jupiter.version>
      <assertj-core.version>3.13.2</assertj-core.version>
      <maven-surefire-failsafe-plugin.version>3.0.0-M3</maven-surefire-failsafe-plugin.version>
   </properties>

   <build>
      <plugins>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-release-plugin</artifactId>
            <version>${maven-release-plugin.version}</version>
            <configuration>
               <!-- see http://blog.sonatype.com/2010/01/how-to-generate-pgp-signatures-with-maven/ -->
               <mavenExecutorId>forked-path</mavenExecutorId>
               <useReleaseProfile>false</useReleaseProfile>
               <arguments>-D${gpg.arguments}</arguments>
               <releaseProfiles>sonatype-oss-release</releaseProfiles>
               <autoVersionSubmodules>true</autoVersionSubmodules>
            </configuration>
         </plugin>
         <!-- use mvn enforcer:enforce to find conflicting dependencies -->
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-enforcer-plugin</artifactId>
            <version>3.0.0-M2</version>
            <configuration>
               <rules>
                  <banDuplicatePomDependencyVersions />
                  <dependencyConvergence />
               </rules>
            </configuration>
         </plugin>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>${maven-surefire-failsafe-plugin.version}</version>
         </plugin>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-failsafe-plugin</artifactId>
            <version>${maven-surefire-failsafe-plugin.version}</version>
            <executions>
               <execution>
                  <goals>
                     <goal>integration-test</goal>
                     <goal>verify</goal>
                  </goals>
               </execution>
            </executions>
         </plugin>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <configuration>
               <source>8</source>
            </configuration>
         </plugin>
      </plugins>
      <pluginManagement>
         <plugins>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-compiler-plugin</artifactId>
               <version>${maven-compiler-plugin.version}</version>
               <configuration>
                  <source>${java.version}</source>
                  <target>${java.version}</target>
                  <release>${java.version}</release>
               </configuration>
            </plugin>
         </plugins>
      </pluginManagement>
   </build>

   <dependencyManagement>
      <dependencies>
         <!-- spring libraries -->
         <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-autoconfigure</artifactId>
            <version>${spring-boot.version}</version>
         </dependency>
         <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-configuration-processor</artifactId>
            <version>${spring-boot.version}</version>
            <optional>true</optional>
         </dependency>
         <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
            <version>${spring-boot.version}</version>
            <scope>provided</scope>
         </dependency>
         <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-logging</artifactId>
            <version>${spring-boot.version}</version>
            <scope>provided</scope>
         </dependency>
         <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-security</artifactId>
            <version>${spring-boot.version}</version>
            <scope>provided</scope>
         </dependency>

         <!-- enable property validation -->
         <dependency>
            <groupId>javax.validation</groupId>
            <artifactId>validation-api</artifactId>
            <version>${validation-api.version}</version>
         </dependency>

         <!-- testing libraries -->
         <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <version>${spring-boot.version}</version>
            <scope>test</scope>
            <exclusions>
               <exclusion>
                  <groupId>org.junit.jupiter</groupId>
                  <artifactId>junit-jupiter</artifactId>
               </exclusion>
               <exclusion>
                  <groupId>org.assertj</groupId>
                  <artifactId>assertj-core</artifactId>
               </exclusion>
            </exclusions>
         </dependency>
         <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <version>${assertj-core.version}</version>
            <scope>test</scope>
         </dependency>
         <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <version>${junit-jupiter.version}</version>
            <scope>test</scope>
         </dependency>
      </dependencies>
   </dependencyManagement>

   <profiles>
      <profile>
         <id>release-sign-artifacts</id>
         <activation>
            <property>
               <name>performRelease</name>
               <value>true</value>
            </property>
         </activation>
         <build>
            <plugins>
               <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-gpg-plugin</artifactId>
                  <version>${maven-gpg-plugin.version}</version>
                  <executions>
                     <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                           <goal>sign</goal>
                        </goals>
                     </execution>
                  </executions>
               </plugin>
            </plugins>
         </build>
      </profile>
   </profiles>

</project>
