<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-starters</artifactId>
    <version>2.2.2.RELEASE</version>
  </parent>

  <groupId>com.gitlab.oliverlj</groupId>
  <artifactId>spring-boot-starter-json-api</artifactId>
  <version>0.2.0</version>

  <name>${project.groupId}:${project.artifactId}</name>
  <description>A spring boot starter which brings json api converter (https://github.com/jasminb/jsonapi-converter) for your great spring project</description>
  <url>https://gitlab.com/oliverlj/spring-boot-starter-json-api</url>

  <developers>
    <developer>
      <name>LE JACQUES Olivier</name>
      <email>o.le.jacques@gmail.com</email>
      <organizationUrl>https://gitlab.com/oliverlj</organizationUrl>
    </developer>
  </developers>

  <distributionManagement>
    <repository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
  </distributionManagement>

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

  <scm>
    <connection>scm:git:git://gitlab.com/oliverlj/spring-boot-starter-json-api.git</connection>
    <developerConnection>scm:git:ssh://gitlab.com:oliverlj/spring-boot-starter-json-api.git</developerConnection>
    <url>https://gitlab.com/oliverlj/spring-boot-starter-json-api/tree/master</url>
  </scm>

  <properties>
    <java.version>8</java.version>
    <!-- Configure the external annotations in build path https://github.com/lastnpe/eclipse-external-annotations-m2e-plugin -->
    <m2e.jdt.annotationpath>etc/eclipse/external-annotations</m2e.jdt.annotationpath>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

    <!-- Unmanaged plugin versions -->
    <maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
    <maven-scm-provider-gitexe-plugin.version>1.11.2</maven-scm-provider-gitexe-plugin.version>
    <nexus-staging-maven-plugin.version>1.6.8</nexus-staging-maven-plugin.version>

    <!-- Unmanaged spring boot dependencies versions -->
    <jsonapi-converter.version>0.10</jsonapi-converter.version>
    <org-eclipse-jdt-annotation.version>2.2.400</org-eclipse-jdt-annotation.version>
  </properties>

  <dependencies>
    <dependency>
      <groupId>com.github.jasminb</groupId>
      <artifactId>jsonapi-converter</artifactId>
      <version>${jsonapi-converter.version}</version>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-webmvc</artifactId>
    </dependency>
    <dependency>
      <groupId>javax.validation</groupId>
      <artifactId>validation-api</artifactId>
    </dependency>

    <dependency>
      <groupId>org.projectlombok</groupId>
      <artifactId>lombok</artifactId>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jdt</groupId>
      <artifactId>org.eclipse.jdt.annotation</artifactId>
      <version>${org-eclipse-jdt-annotation.version}</version>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-configuration-processor</artifactId>
      <optional>true</optional>
    </dependency>

    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.rest-assured</groupId>
      <artifactId>rest-assured</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-test</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-web</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>${java.version}</source>
          <target>${java.version}</target>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <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-deploy-plugin</artifactId>
            <executions>
              <execution>
                <id>default-deploy</id>
                <phase>deploy</phase>
                <goals>
                  <goal>deploy</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <repositoryId>ossrh</repositoryId>
              <url>https://oss.sonatype.org/</url>
            </configuration>
          </plugin>
          <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>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <configuration>
              <javadocExecutable>${java.home}/../bin/javadoc</javadocExecutable>
              <source>${java.version}</source>
            </configuration>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-release-plugin</artifactId>
            <configuration>
              <localCheckout>true</localCheckout>
              <pushChanges>false</pushChanges>
              <mavenExecutorId>forked-path</mavenExecutorId>
              <arguments>-Dgpg.passphrase=${gpg.passphrase}</arguments>
            </configuration>
            <dependencies>
              <dependency>
                <groupId>org.apache.maven.scm</groupId>
                <artifactId>maven-scm-provider-gitexe</artifactId>
                <version>${maven-scm-provider-gitexe-plugin.version}</version>
              </dependency>
            </dependencies>
          </plugin>
          <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>
<!--           <plugin> -->
<!--             <groupId>org.sonatype.plugins</groupId> -->
<!--             <artifactId>nexus-staging-maven-plugin</artifactId> -->
<!--             <version>${nexus-staging-maven-plugin.version}</version> -->
<!--             <executions> -->
<!--               <execution> -->
<!--                 <id>default-deploy</id> -->
<!--                 <phase>deploy</phase> -->
<!--                 <goals> -->
<!--                   <goal>deploy</goal> -->
<!--                 </goals> -->
<!--               </execution> -->
<!--             </executions> -->
<!--             <extensions>true</extensions> -->
<!--             <configuration> -->
<!--               <serverId>ossrh</serverId> -->
<!--               <nexusUrl>https://oss.sonatype.org/</nexusUrl> -->
<!--               <autoReleaseAfterClose>true</autoReleaseAfterClose> -->
<!--             </configuration> -->
<!--           </plugin> -->
        </plugins>
      </build>
    </profile>
  </profiles>

</project>