<?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>io.buildlogic</groupId>
   <artifactId>truststore-maven-plugin</artifactId>
   <version>6.0.0</version>
   <modelVersion>4.0.0</modelVersion>
   <packaging>maven-plugin</packaging>
   <name>Truststore Maven Plugin</name>
   <description>Maven plugin generating truststores in multiple formats</description>
   <url>https://github.com/ipastusi/truststore-maven-plugin</url>
   <inceptionYear>2020</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/ipastusi</organizationUrl>
      </developer>
   </developers>

   <scm>
      <connection>scm:git:git@github.com:ipastusi/truststore-maven-plugin.git</connection>
      <developerConnection>scm:git:git@github.com:ipastusi/truststore-maven-plugin.git</developerConnection>
      <url>git@github.com:ipastusi/truststore-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>
      <slf4j.version>2.0.9</slf4j.version>
      <bc.version>1.77</bc.version>
   </properties>

   <build>
      <plugins>

         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-plugin-plugin</artifactId>
            <version>3.10.2</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://s01.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.11.0</version>
            <configuration>
               <source>11</source>
               <target>11</target>
            </configuration>
         </plugin>

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

         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-invoker-plugin</artifactId>
            <version>3.6.0</version>
            <configuration>
               <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
               <settingsFile>src/it/settings.xml</settingsFile>
               <localRepositoryPath>${project.build.directory}/it-repo</localRepositoryPath>
               <postBuildHookScript>verify</postBuildHookScript>
               <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.4.1</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.3.0</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.6.2</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.16.2</version>
               </plugin>

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

   </profiles>

   <dependencies>
      <dependency>
         <groupId>org.bouncycastle</groupId>
         <artifactId>bcpkix-jdk18on</artifactId>
         <version>${bc.version}</version>
         <scope>provided</scope>
      </dependency>
      <dependency>
         <groupId>org.apache.maven</groupId>
         <artifactId>maven-plugin-api</artifactId>
         <version>3.9.5</version>
         <scope>provided</scope>
      </dependency>
      <dependency>
         <groupId>org.apache.maven.plugin-tools</groupId>
         <artifactId>maven-plugin-annotations</artifactId>
         <version>3.10.2</version>
         <scope>provided</scope>
      </dependency>
      <dependency>
         <groupId>org.projectlombok</groupId>
         <artifactId>lombok</artifactId>
         <version>1.18.30</version>
         <scope>provided</scope>
      </dependency>
      <dependency>
         <groupId>uk.co.automatictester</groupId>
         <artifactId>jproxy</artifactId>
         <version>1.0.0</version>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.testng</groupId>
         <artifactId>testng</artifactId>
         <version>7.8.0</version>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.assertj</groupId>
         <artifactId>assertj-core</artifactId>
         <version>3.24.2</version>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.mockito</groupId>
         <artifactId>mockito-core</artifactId>
         <version>5.7.0</version>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.wiremock</groupId>
         <artifactId>wiremock</artifactId>
         <version>3.3.1</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://s01.oss.sonatype.org/content/repositories/snapshots</url>
      </snapshotRepository>
   </distributionManagement>

</project>
