<?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">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.microsoft.bot.sample</groupId>
    <artifactId>bot-teams-task-module</artifactId>
    <version>sample</version>
    <packaging>jar</packaging>

    <name>${project.groupId}:${project.artifactId}</name>
    <description>This package contains a Java Teams Task Module sample using Spring Boot.</description>
    <url>http://maven.apache.org</url>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.1.7.RELEASE</version>
        <relativePath/>
    </parent>

    <licenses>
        <license>
            <name>MIT License</name>
            <url>http://www.opensource.org/licenses/mit-license.php</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Bot Framework Development</name>
            <email></email>
            <organization>Microsoft</organization>
            <organizationUrl>https://dev.botframework.com/</organizationUrl>
        </developer>
    </developers>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <java.version>1.8</java.version>
        <maven.compiler.target>1.8</maven.compiler.target>
        <maven.compiler.source>1.8</maven.compiler.source>
        <start-class>com.microsoft.bot.sample.teamstaskmodule.Application</start-class>
        <repo.url>https://botbuilder.myget.org/F/botbuilder-v4-java-daily/maven/</repo.url>
    </properties>

    <dependencies>
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.12</version>
        <scope>test</scope>
      </dependency>
      <dependency>
          <groupId>org.springframework.boot</groupId>
          <artifactId>spring-boot-starter-test</artifactId>
          <version>2.1.8.RELEASE</version>
          <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
      </dependency>
      <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-api</artifactId>
        <version>2.11.0</version>
      </dependency>
      <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-core</artifactId>
        <version>2.11.0</version>
      </dependency>
      <dependency>
        <groupId>com.microsoft.bot</groupId>
        <artifactId>bot-integration-spring</artifactId>
        <version>4.6.0-preview7</version>
        <scope>compile</scope>
      </dependency>
      <dependency>
        <groupId>org.json</groupId>
        <artifactId>json</artifactId>
        <version>20190722</version>
      </dependency>
      <dependency>
        <groupId>io.adaptivecards</groupId>
        <artifactId>adaptivecards-android</artifactId>
        <version>1.2.8</version>
      </dependency>
    </dependencies>

  <repositories>
    <repository>
      <id>MyGet</id>
      <url>${repo.url}</url>
    </repository>
  </repositories>

  <distributionManagement>
    <repository>
      <id>ossrh</id>
      <!--      <url>${repo.url}</url>-->
      <url>https://oss.sonatype.org/</url>
      <!--      <url>https://repo.maven.apache.org/maven2</url>-->
    </repository>
  </distributionManagement>

  <profiles>
    <profile>
      <id>build</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <build>
          <plugins>
              <plugin>
                  <artifactId>maven-compiler-plugin</artifactId>
                  <version>3.8.1</version>
                  <configuration>
                      <source>1.8</source>
                      <target>1.8</target>
                  </configuration>
              </plugin>
              <plugin>
                  <artifactId>maven-war-plugin</artifactId>
                  <version>3.2.3</version>
                  <configuration>
                      <warSourceDirectory>src/main/webapp</warSourceDirectory>
                  </configuration>
              </plugin>
              <plugin>
                  <groupId>org.springframework.boot</groupId>
                  <artifactId>spring-boot-maven-plugin</artifactId>
                  <executions>
                      <execution>
                          <goals>
                              <goal>repackage</goal>
                          </goals>
                          <configuration>
                              <mainClass>com.microsoft.bot.sample.teamstaskmodule.Application</mainClass>
                          </configuration>
                      </execution>
                  </executions>
              </plugin>
              <plugin>
                  <groupId>com.microsoft.azure</groupId>
                  <artifactId>azure-webapp-maven-plugin</artifactId>
                  <version>1.7.0</version>
                  <configuration>
                      <schemaVersion>V2</schemaVersion>
                      <resourceGroup>{groupname}</resourceGroup>
                      <appName>{botname}</appName>
                      <appSettings>
                          <property>
                              <name>JAVA_OPTS</name>
                              <value>-Dserver.port=80</value>
                          </property>
                      </appSettings>
                      <runtime>
                          <os>linux</os>
                          <javaVersion>jre8</javaVersion>
                          <webContainer>jre8</webContainer>
                      </runtime>
                      <deployment>
                          <resources>
                              <resource>
                                  <directory>${project.basedir}/target</directory>
                                  <includes>
                                      <include>*.jar</include>
                                  </includes>
                              </resource>
                          </resources>
                      </deployment>
                  </configuration>
              </plugin>
              <plugin>
                  <groupId>org.eluder.coveralls</groupId>
                  <artifactId>coveralls-maven-plugin</artifactId>
                  <version>4.3.0</version>
                  <configuration>
                      <repoToken>yourcoverallsprojectrepositorytoken</repoToken>
                  </configuration>
              </plugin>
              <plugin>
                  <groupId>org.codehaus.mojo</groupId>
                  <artifactId>cobertura-maven-plugin</artifactId>
                  <version>2.7</version>
                  <configuration>
                      <outputDirectory>../../cobertura-report/spring-teamstaskmodule-sample</outputDirectory>
                      <format>xml</format>
                      <maxmem>256m</maxmem>
                      <!-- aggregated reports for multi-module projects -->
                      <aggregate>true</aggregate>
                  </configuration>
              </plugin>
              <!--<plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-pmd-plugin</artifactId>
                  <version>3.12.0</version>
                  <executions>
                      <execution>
                          <phase>validate</phase>
                          <goals>
                              <goal>check</goal>
                          </goals>
                      </execution>
                  </executions>
              </plugin>-->

              <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <version>3.7.1</version>
              </plugin>
              <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>3.0.0</version>
            </plugin>

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

    <profile>
      <id>publish</id>
      <build>
        <plugins>

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-jar-plugin</artifactId>
          </plugin>

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

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <configuration>
              <source>8</source>
              <failOnError>false</failOnError>
            </configuration>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-pmd-plugin</artifactId>
        <version>3.12.0</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>3.1.0</version>
        <reportSets>
          <reportSet>
            <reports>
              <report>checkstyle</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
    </plugins>
  </reporting>

</project>
