<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>in.neuw</groupId>
  <artifactId>aws-iam-roles-anywhere</artifactId>
  <version>1.0.2</version>
  <packaging>pom</packaging>

  <name>${project.groupId}:${project.artifactId}</name>
  <description>AWS IAM roles anywhere credential provider library for Java</description>
  <url>https://github.com/neuw/aws-iam-roles-anywhere</url>
  <modules>
    <module>core</module>
    <module>starter</module>
  </modules>

  <licenses>
    <license>
      <name>The Apache License, Version 2.0</name>
      <url>https://github.com/neuw/aws-iam-roles-anywhere/blob/main/LICENSE</url>
    </license>
  </licenses>

  <scm>
    <connection>scm:git:git://github.com/neuw/aws-iam-roles-anywhere.git</connection>
    <developerConnection>scm:git:ssh://github.com:neuw/aws-iam-roles-anywhere.git</developerConnection>
    <url>https://github.com/neuw/aws-iam-roles-anywhere/tree/main</url>
  </scm>

  <developers>
    <developer>
      <name>Karanbir Singh</name>
      <email>krnbr@live.in</email>
      <organization>Neuw</organization>
      <organizationUrl>https://www.linkedin.com/in/krnbr/</organizationUrl>
    </developer>
  </developers>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <aws-sdk.version>2.41.14</aws-sdk.version>
    <spring-boot.version>4.0.2</spring-boot.version>
    <java.version>17</java.version>
    <parent.version>${project.version}</parent.version>
    <jackson-bom.version>3.0.4</jackson-bom.version>
    <maven-resources-plugin.version>3.3.1</maven-resources-plugin.version>
    <jacoco.version>0.8.10</jacoco.version>
    <maven.build.timestamp.format>yyyy-MM-dd</maven.build.timestamp.format>
    <build.date>${maven.build.timestamp}</build.date>
    <vendor.name>Neuw</vendor.name>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>software.amazon.awssdk</groupId>
        <artifactId>bom</artifactId>
        <version>${aws-sdk.version}</version>
        <scope>import</scope>
        <type>pom</type>
      </dependency>
      <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-dependencies</artifactId>
        <version>${spring-boot.version}</version>
        <scope>import</scope>
        <type>pom</type>
      </dependency>
      <dependency>
        <groupId>tools.jackson</groupId>
        <artifactId>jackson-bom</artifactId>
        <version>${jackson-bom.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>in.neuw</groupId>
        <artifactId>aws-iam-roles-anywhere-core</artifactId>
        <version>${parent.version}</version>
      </dependency>
      <dependency>
        <groupId>in.neuw</groupId>
        <artifactId>aws-iam-roles-anywhere-starter</artifactId>
        <version>${parent.version}</version>
      </dependency>

    </dependencies>
  </dependencyManagement>
  <build>
    <plugins>
      <plugin>
        <groupId>org.sonarsource.scanner.maven</groupId>
        <artifactId>sonar-maven-plugin</artifactId>
        <version>3.10.0.2594</version>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>${jacoco.version}</version>
        <executions>
          <execution>
            <id>initialize-coverage-before-unit-test-execution</id>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
          <execution>
            <id>initialize-coverage-before-integration-test-execution</id>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
            <phase>pre-integration-test</phase>
            <configuration>
              <propertyName>integrationTestCoverageAgent</propertyName>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <annotationProcessorPaths>
            <path>
              <groupId>org.projectlombok</groupId>
              <artifactId>lombok</artifactId>
            </path>
          </annotationProcessorPaths>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>2.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.12.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>3.2.2</version>
        <executions>
          <execution>
            <id>sign-artifacts</id>
            <phase>verify</phase>
            <goals>
              <goal>sign</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <keyname>1A66720968C5AB867D6CEE8C64C34C4287CD0D4C</keyname>
          <gpgArguments>
            <argument>--pinentry-mode</argument>
            <argument>loopback</argument>
          </gpgArguments>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.sonatype.central</groupId>
        <artifactId>central-publishing-maven-plugin</artifactId>
        <version>0.7.0</version>
        <extensions>true</extensions>
        <configuration>
          <autoPublish>true</autoPublish>
          <deploymentName>deploy-${build.date}-${project.version}-${aws-sdk.version}-${spring-boot.version}-1</deploymentName>
          <publishingServerId>central</publishingServerId>
          <skipPublishing>false</skipPublishing>
          <waitUntil>validated</waitUntil>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>coverage</id>
      <modules>
        <module>core</module>
        <module>starter</module>
        <module>tests</module>
      </modules>
    </profile>
    <profile>
      <id>default</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <modules>
        <module>core</module>
        <module>starter</module>
      </modules>
    </profile>
  </profiles>

</project>
