<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (c) 2022, salesforce.com, inc.
  ~ All rights reserved.
  ~ SPDX-License-Identifier: BSD-3-Clause
  ~ For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
  -->

<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-starter-parent</artifactId>
    <version>2.6.6</version>
    <relativePath /> <!-- lookup parent from repository -->
  </parent>
  <groupId>com.salesforce.einsteinbot</groupId>
  <artifactId>einstein-bot-channel-connector</artifactId>
  <name>einstein-bot-channel-connector</name>
  <version>2.0.4</version>
  <description>Parent Maven project for Einstein Bots channel connector</description>
  <url>https://github.com/forcedotcom/einstein-bot-channel-connector</url>
  <packaging>pom</packaging>
  <properties>
    <java.version>1.8</java.version>
    <junit-jupiter-version>5.5.2</junit-jupiter-version>
    <maven-javadoc-plugin.version>3.2.0</maven-javadoc-plugin.version>
    <maven-release-plugin.version>3.0.0-M1</maven-release-plugin.version>
    <maven-source-plugin.version>3.2.1</maven-source-plugin.version>
    <einstein-bot-sdk-java-version>2.0.5</einstein-bot-sdk-java-version>
  </properties>

  <licenses>
    <license>
      <name>BSD 3-Clause</name>
      <url>file://${basedir}/LICENSE.txt</url>
    </license>
  </licenses>
  <organization>
    <name>Salesforce</name>
    <url>http://www.salesforce.com</url>
  </organization>

  <developers>
    <developer>
      <name>Salesforce</name>
      <roles>
        <role>Developer</role>
      </roles>
      <email>osscore@salesforce.com</email>
      <organization>Salesforce</organization>
    </developer>
    <developer>
      <name>Rajasekar Elango</name>
      <roles>
        <role>Developer</role>
      </roles>
      <email>einstein-bots-platform@salesforce.com</email>
      <organization>Salesforce</organization>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:https://github.com/forcedotcom/einstein-bot-channel-connector.git</connection>
    <developerConnection>scm:git:https://github.com/forcedotcom/einstein-bot-channel-connector.git</developerConnection>
    <url>https://github.com/forcedotcom/einstein-bot-channel-connector</url>
    <tag>v2.0.4</tag>
  </scm>

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

  <modules>
    <module>channel-connector-starter</module>
    <module>channel-connector-archetype</module>
    <module>examples/ui-connector</module>
    <module>examples/twitter-connector</module>
    <module>examples/twilio-sms-connector</module>
    <module>examples/slack-connector</module>
  </modules>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>${maven-release-plugin.version}</version>
        <configuration>
          <tagNameFormat>v@{project.version}</tagNameFormat>
          <autoVersionSubmodules>true</autoVersionSubmodules>
          <releaseProfiles>releases</releaseProfiles>
          <scmCommentPrefix>release: </scmCommentPrefix>
        </configuration>
      </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>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>sign-artifacts</id>

      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>${maven-javadoc-plugin.version}</version>
            <configuration>
              <bottom>Copyright (c) 2004-2021, Salesforce.com, Inc. All
                rights
                reserved. Licensed under
                the BSD 3-Clause license. For full license
                text, see the LICENSE.txt
                file in the
                repository.
              </bottom>
              <doclint>none</doclint>
            </configuration>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
              <execution>
                <id>aggregate</id>
                <goals>
                  <goal>aggregate</goal>
                </goals>
                <phase>site</phase>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>${maven-source-plugin.version}</version>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <!-- Sign the artifacts -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.6</version>
            <configuration>
              <!-- Prevent gpg from using pinentry programs -->
              <gpgArguments>
                <arg>--pinentry-mode</arg>
                <arg>loopback</arg>
              </gpgArguments>
              <keyname>0xA102B34F</keyname>
            </configuration>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <goals>
                  <goal>sign</goal>
                </goals>
                <phase>verify</phase>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>releases</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
            <version>1.5.1</version>
            <executions>
              <execution>
                <id>default-deploy</id>
                <phase>deploy</phase>
                <goals>
                  <goal>deploy</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <serverId>ossrh</serverId>
              <nexusUrl>https://oss.sonatype.org/</nexusUrl>
              <autoReleaseAfterClose>true</autoReleaseAfterClose>
              <stagingProgressTimeoutMinutes>15</stagingProgressTimeoutMinutes>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>