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

   <groupId>uk.co.automatictester</groupId>
   <artifactId>wiremock-maven-plugin</artifactId>
   <version>7.3.0</version>
   <modelVersion>4.0.0</modelVersion>
   <packaging>maven-plugin</packaging>
   <name>WireMock Maven Plugin</name>
   <description>Run WireMock as part of Maven lifecycle</description>
   <url>https://github.com/automatictester/wiremock-maven-plugin</url>
   <inceptionYear>2016</inceptionYear>

   <licenses>
      <license>
         <name>MIT License</name>
         <url>https://opensource.org/licenses/mit-license.php</url>
         <distribution>repo</distribution>
      </license>
   </licenses>

   <developers>
      <developer>
         <name>Ireneusz Pastusiak</name>
         <email>ireneusz.pastusiak@gmail.com</email>
         <organizationUrl>https://github.com/automatictester</organizationUrl>
      </developer>
   </developers>

   <scm>
      <connection>scm:git:git@github.com:automatictester/wiremock-maven-plugin.git</connection>
      <developerConnection>scm:git:git@github.com:automatictester/wiremock-maven-plugin.git</developerConnection>
      <url>git@github.com:automatictester/wiremock-maven-plugin.git</url>
      <tag>HEAD</tag>
   </scm>

   <properties>
      <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
      <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
      <wiremock.version>2.35.0</wiremock.version>
      <jackson.version>2.10.1</jackson.version>
      <slf4j.version>2.0.6</slf4j.version>
   </properties>

   <build>
      <plugins>

         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-plugin-plugin</artifactId>
            <version>3.7.0</version>
         </plugin>

         <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
            <version>1.6.13</version>
            <extensions>true</extensions>
            <configuration>
               <serverId>ossrh</serverId>
               <nexusUrl>https://oss.sonatype.org/</nexusUrl>
               <autoReleaseAfterClose>true</autoReleaseAfterClose>
               <autoDropAfterRelease>true</autoDropAfterRelease>
            </configuration>
         </plugin>

         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.10.1</version>
            <configuration>
               <source>1.8</source>
               <target>1.8</target>
            </configuration>
         </plugin>

         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-dependency-plugin</artifactId>
            <version>3.4.0</version>
         </plugin>

         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-invoker-plugin</artifactId>
            <version>3.4.0</version>
            <configuration>
               <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
               <settingsFile>src/it/settings.xml</settingsFile>
               <localRepositoryPath>${project.build.directory}/it-repo</localRepositoryPath>
               <streamLogs>true</streamLogs>
            </configuration>
            <executions>
               <execution>
                  <goals>
                     <goal>install</goal>
                     <goal>run</goal>
                  </goals>
               </execution>
            </executions>
         </plugin>

         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-enforcer-plugin</artifactId>
            <version>3.1.0</version>
            <executions>
               <execution>
                  <id>enforce</id>
                  <goals>
                     <goal>enforce</goal>
                  </goals>
                  <configuration>
                     <rules>
                        <banDuplicatePomDependencyVersions/>
                        <requireProfileIdsExist/>
                        <requireReleaseDeps/>
                     </rules>
                  </configuration>
               </execution>
            </executions>
         </plugin>

      </plugins>
   </build>

   <profiles>

      <profile>
         <id>release</id>
         <build>
            <plugins>

               <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-enforcer-plugin</artifactId>
                  <dependencies>
                     <dependency>
                        <groupId>uk.co.automatictester</groupId>
                        <artifactId>enforcer-rules</artifactId>
                        <version>1.0.0</version>
                     </dependency>
                  </dependencies>
                  <executions>
                     <execution>
                        <id>enforce-release</id>
                        <goals>
                           <goal>enforce</goal>
                        </goals>
                        <configuration>
                           <rules>
                              <requireVersionPattern
                                      implementation="uk.co.automatictester.enforcer.rules.RequireVersionPattern">
                                 <versionPattern>^\d+\.\d+\.\d+$</versionPattern>
                              </requireVersionPattern>
                           </rules>
                        </configuration>
                     </execution>
                  </executions>
               </plugin>

               <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-source-plugin</artifactId>
                  <version>3.2.1</version>
                  <executions>
                     <execution>
                        <id>attach-sources</id>
                        <goals>
                           <goal>jar-no-fork</goal>
                        </goals>
                     </execution>
                  </executions>
               </plugin>

               <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-javadoc-plugin</artifactId>
                  <version>3.4.1</version>
                  <executions>
                     <execution>
                        <id>attach-javadocs</id>
                        <goals>
                           <goal>jar</goal>
                        </goals>
                     </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>
                        <configuration>
                           <gpgArguments>
                              <arg>--pinentry-mode</arg>
                              <arg>loopback</arg>
                           </gpgArguments>
                        </configuration>
                     </execution>
                  </executions>
               </plugin>

               <plugin>
                  <groupId>org.codehaus.mojo</groupId>
                  <artifactId>versions-maven-plugin</artifactId>
                  <version>2.14.2</version>
               </plugin>

            </plugins>
         </build>
      </profile>

   </profiles>

   <dependencies>
      <dependency>
         <groupId>com.github.tomakehurst</groupId>
         <artifactId>wiremock-jre8</artifactId>
         <version>${wiremock.version}</version>
         <scope>provided</scope>
      </dependency>
      <dependency>
         <groupId>org.apache.maven</groupId>
         <artifactId>maven-plugin-api</artifactId>
         <version>3.8.6</version>
         <scope>provided</scope>
      </dependency>
      <dependency>
         <groupId>org.apache.maven.plugin-tools</groupId>
         <artifactId>maven-plugin-annotations</artifactId>
         <version>3.7.0</version>
         <scope>provided</scope>
      </dependency>
      <dependency>
         <groupId>org.testng</groupId>
         <artifactId>testng</artifactId>
         <version>7.5</version>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.hamcrest</groupId>
         <artifactId>hamcrest-all</artifactId>
         <version>1.3</version>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.slf4j</groupId>
         <artifactId>slf4j-simple</artifactId>
         <version>${slf4j.version}</version>
         <scope>test</scope>
      </dependency>
   </dependencies>

   <dependencyManagement>
      <dependencies>
         <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j.version}</version>
         </dependency>
      </dependencies>
   </dependencyManagement>

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

</project>
