<?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>4.4.0</version>
   <modelVersion>4.0.0</modelVersion>
   <packaging>maven-plugin</packaging>
   <name>wiremock-maven-plugin</name>
   <description>WireMock Maven Plugin</description>
   <url>https://github.com/automatictester/wiremock-maven-plugin</url>

   <licenses>
      <license>
         <name>MIT License</name>
         <url>http://www.opensource.org/licenses/mit-license.php</url>
      </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>
      <skip.integration.tests>false</skip.integration.tests>
      <wiremock.version>2.23.2</wiremock.version>
      <jackson.version>2.9.8</jackson.version>
   </properties>

   <build>
      <plugins>

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

         <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
            <version>1.6.8</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.8.0</version>
            <configuration>
               <source>1.7</source>
               <target>1.7</target>
            </configuration>
         </plugin>

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

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

         <plugin>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco-maven-plugin</artifactId>
            <version>0.8.3</version>
            <configuration>
               <includes>**/*</includes>
            </configuration>
            <executions>
               <execution>
                  <id>pre-unit-test</id>
                  <phase>process-test-classes</phase>
                  <goals>
                     <goal>prepare-agent</goal>
                  </goals>
               </execution>
               <execution>
                  <id>pre-integration-test</id>
                  <phase>pre-integration-test</phase>
                  <goals>
                     <goal>prepare-agent-integration</goal>
                  </goals>
                  <configuration>
                     <propertyName>invoker.mavenOpts</propertyName>
                  </configuration>
               </execution>
               <execution>
                  <id>default-report</id>
                  <goals>
                     <goal>report</goal>
                  </goals>
               </execution>
               <execution>
                  <id>default-report-integration</id>
                  <goals>
                     <goal>report-integration</goal>
                  </goals>
               </execution>
            </executions>
         </plugin>

         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-enforcer-plugin</artifactId>
            <version>3.0.0-M2</version>
            <executions>
               <execution>
                  <id>enforce</id>
                  <goals>
                     <goal>enforce</goal>
                  </goals>
                  <configuration>
                     <rules>
                        <banDuplicatePomDependencyVersions/>
                        <dependencyConvergence/>
                        <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.0.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.1.0</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.7</version>
               </plugin>

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

   </profiles>

   <dependencies>
      <dependency>
         <groupId>org.apache.maven</groupId>
         <artifactId>maven-plugin-api</artifactId>
         <version>3.6.1</version>
      </dependency>
      <dependency>
         <groupId>org.apache.maven.plugin-tools</groupId>
         <artifactId>maven-plugin-annotations</artifactId>
         <version>3.6.0</version>
      </dependency>
      <dependency>
         <groupId>com.github.tomakehurst</groupId>
         <artifactId>wiremock</artifactId>
         <version>${wiremock.version}</version>
      </dependency>
      <dependency>
         <groupId>org.testng</groupId>
         <artifactId>testng</artifactId>
         <version>6.14.3</version>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.hamcrest</groupId>
         <artifactId>hamcrest-all</artifactId>
         <version>1.3</version>
         <scope>test</scope>
      </dependency>
   </dependencies>

   <dependencyManagement>
      <dependencies>
         <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.7.26</version>
         </dependency>
         <dependency>
            <groupId>org.ow2.asm</groupId>
            <artifactId>asm</artifactId>
            <version>5.2</version>
         </dependency>
         <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-utils</artifactId>
            <version>3.2.0</version>
         </dependency>
         <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
         </dependency>
         <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>3.8.1</version>
         </dependency>
         <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-annotations</artifactId>
            <version>${jackson.version}</version>
         </dependency>
         <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>${jackson.version}</version>
         </dependency>
         <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
            <version>${jackson.version}</version>
         </dependency>
         <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-artifact</artifactId>
            <version>3.6.1</version>
         </dependency>
         <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-classworlds</artifactId>
            <version>2.6.0</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>
