<?xml version="1.0" encoding="UTF-8"?>
<!--
    
    Copyright 2020 American Express Travel Related Services Company, Inc.

    Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
    in compliance with the License. You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software distributed under the License
    is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
    or implied. See the License for the specific language governing permissions and limitations under
    the License.
-->
<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>io.americanexpress</groupId>
    <artifactId>synapse</artifactId>
    <packaging>pom</packaging>
    <version>0.1.0</version>

    <description>
        Synapse is a set of lightweight foundational framework modules for rapid development built-in with enterprise
        grade maturity and quality.
    </description>
    <url>https://github.com/americanexpress/synapse</url>

    <developers>
        <developer>
            <name>American Express Travel Related Services, Inc.</name>
            <organizationUrl>https://americanexpress.com</organizationUrl>
        </developer>
    </developers>

    <properties>
        <java.version>11</java.version>
        <maven.compiler.source>11</maven.compiler.source>
        <maven.compiler.target>11</maven.compiler.target>

        <!--Spring Versions-->
        <spring-framework.version>5.3.9</spring-framework.version>
        <spring-security.version>5.5.2</spring-security.version>
        <spring-boot-framework.version>2.5.4</spring-boot-framework.version>
        <spring-boot-ws-framework.version>1.4.7.RELEASE</spring-boot-ws-framework.version>

        <!--SpringFox-->
        <springfox-swagger.version>3.0.0</springfox-swagger.version>

        <!-- GraphQL -->
        <spring-boot-graphql.version>11.0.0</spring-boot-graphql.version>

        <!--Mock Dependency Versions-->
        <mockito.version>2.23.4</mockito.version>

        <!--JUnit Versions-->
        <junit.version>1.7.0</junit.version>
        <junit.jupiter.version>5.6.2</junit.jupiter.version>

        <!--Jackson-->
        <jackson.version>2.12.4</jackson.version>

        <!--Plugins-->
        <jaxws-maven-plugin.version>2.5</jaxws-maven-plugin.version>
    </properties>

    <modules>
        <module>framework</module>
        <module>service</module>
        <module>client</module>
        <module>data</module>
        <module>publisher</module>
        <module>utility</module>
    </modules>


    <!--Dependency Management-->
    <dependencyManagement>
        <dependencies>
            <!--Synapse Dependencies-->
            <!--Framework-->
            <dependency>
                <groupId>io.americanexpress</groupId>
                <artifactId>synapse-framework-logging</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>io.americanexpress</groupId>
                <artifactId>synapse-framework-exception</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>io.americanexpress</groupId>
                <artifactId>synapse-framework-test</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>io.americanexpress</groupId>
                <artifactId>synapse-framework-api-docs</artifactId>
                <version>${project.version}</version>
            </dependency>
            <!--Service-->
            <dependency>
                <groupId>io.americanexpress</groupId>
                <artifactId>synapse-service-graphql</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>io.americanexpress</groupId>
                <artifactId>synapse-service-rest</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>io.americanexpress</groupId>
                <artifactId>synapse-service-test</artifactId>
                <version>${project.version}</version>
            </dependency>
            <!--Client-->
            <dependency>
                <groupId>io.americanexpress</groupId>
                <artifactId>synapse-client-graphql</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>io.americanexpress</groupId>
                <artifactId>synapse-client-rest</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>io.americanexpress</groupId>
                <artifactId>synapse-client-test</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>io.americanexpress</groupId>
                <artifactId>synapse-client-soap</artifactId>
                <version>${project.version}</version>
            </dependency>
            <!--Data-->
            <dependency>
                <groupId>io.americanexpress</groupId>
                <artifactId>synapse-data-couchbase</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>io.americanexpress</groupId>
                <artifactId>synapse-data-postgres</artifactId>
                <version>${project.version}</version>
            </dependency>
            <!--Utility-->
            <dependency>
                <groupId>io.americanexpress</groupId>
                <artifactId>synapse-utilities-common</artifactId>
                <version>${project.version}</version>
            </dependency>
            <!-- Publisher -->
            <dependency>
                <groupId>io.americanexpress</groupId>
                <artifactId>synapse-publisher-kafka</artifactId>
                <version>${project.version}</version>
            </dependency>
            <!--Examples-->
            <dependency>
                <groupId>io.americanexpress</groupId>
                <artifactId>service-book-graphql-example</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>io.americanexpress</groupId>
                <artifactId>service-book-rest-example</artifactId>
                <version>${project.version}</version>
            </dependency>

            <!--External Dependencies-->
            <dependency>
                <groupId>com.github.stefanbirkner</groupId>
                <artifactId>system-rules</artifactId>
                <scope>compile</scope><!-- IN THIS CASE COMPILES NEEDS TO BE OVERRIDDEN BECAUSE THE DEFAULT IS TEST-->
                <version>1.19.0</version>
            </dependency>

            <!--Spring Dependencies-->
            <dependency>
                <groupId>org.springframework.plugin</groupId>
                <artifactId>spring-plugin-core</artifactId>
                <version>2.0.0.RELEASE</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-framework-bom</artifactId>
                <version>${spring-framework.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-web</artifactId>
                <version>${spring-framework.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework.security</groupId>
                <artifactId>spring-security-core</artifactId>
                <version>${spring-security.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework.security</groupId>
                <artifactId>spring-security-test</artifactId>
                <version>${spring-security.version}</version>
            </dependency>

            <!--Spring Boot Dependencies-->
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-ws</artifactId>
                <version>${spring-boot-ws-framework.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-dependencies</artifactId>
                <version>${spring-boot-framework.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>30.1.1-jre</version>
            </dependency>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-data-rest</artifactId>
                <version>${spring-boot-framework.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter</artifactId>
                <version>${spring-boot-framework.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.springframework.boot</groupId>
                        <artifactId>spring-boot-starter-logging</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-webflux</artifactId>
                <version>${spring-boot-framework.version}</version>
            </dependency>

            <!--Wavefront-->
            <dependency>
                <groupId>com.wavefront</groupId>
                <artifactId>wavefront-spring-boot-starter</artifactId>
                <version>2.2.0</version>
            </dependency>
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-starter-sleuth</artifactId>
                <version>3.0.3</version>
            </dependency>

            <!--GraphQL-->
            <dependency>
                <groupId>com.graphql-java</groupId>
                <artifactId>graphql-java-tools</artifactId>
                <version>5.2.4</version>
            </dependency>
            <dependency>
                <groupId>com.graphql-java</groupId>
                <artifactId>graphql-java-extended-scalars</artifactId>
                <version>16.0.1</version>
                <exclusions>
                    <exclusion>
                        <groupId>com.graphql-java</groupId>
                        <artifactId>graphql-java</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>com.graphql-java-kickstart</groupId>
                <artifactId>graphql-spring-boot-starter</artifactId>
                <version>${spring-boot-graphql.version}</version>
            </dependency>
            <dependency>
                <groupId>com.graphql-java-kickstart</groupId>
                <artifactId>graphiql-spring-boot-starter</artifactId>
                <version>${spring-boot-graphql.version}</version>
            </dependency>
            <dependency>
                <groupId>com.graphql-java-kickstart</groupId>
                <artifactId>voyager-spring-boot-starter</artifactId>
                <version>${spring-boot-graphql.version}</version>
            </dependency>

            <!--Tomcat-->
            <dependency>
                <groupId>org.apache.tomcat.embed</groupId>
                <artifactId>tomcat-embed-core</artifactId>
                <version>9.0.45</version>
            </dependency>

            <!--Netty-->
            <dependency>
                <groupId>io.netty</groupId>
                <artifactId>netty-codec-http</artifactId>
                <version>4.1.59.Final</version>
            </dependency>

            <!--Apache Dependencies-->
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>3.8.1</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-collections4</artifactId>
                <version>4.4</version>
            </dependency>
            <dependency>
                <groupId>org.apache.santuario</groupId>
                <artifactId>xmlsec</artifactId>
                <version>2.1.4</version>
            </dependency>
            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>2.6</version>
            </dependency>

            <!--EhCache-->
            <dependency>
                <groupId>net.sf.ehcache</groupId>
                <artifactId>ehcache</artifactId>
                <version>2.10.9.2</version>
            </dependency>
            <dependency>
                <groupId>org.ehcache</groupId>
                <artifactId>ehcache</artifactId>
                <version>3.8.1</version>
            </dependency>

            <!--Hibernate-->
            <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-ehcache</artifactId>
                <version>5.3.10.Final</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-annotations</artifactId>
                <version>3.5.6-Final</version>
            </dependency>

            <!--Jasypt-->
            <dependency>
                <groupId>org.jasypt</groupId>
                <artifactId>jasypt</artifactId>
                <version>1.9.3</version>
            </dependency>

            <!--Postgres-->
            <dependency>
                <groupId>org.postgresql</groupId>
                <artifactId>postgresql</artifactId>
                <version>42.2.5</version>
            </dependency>

            <!--Persistence-->
            <dependency>
                <groupId>javax.persistence</groupId>
                <artifactId>javax.persistence-api</artifactId>
                <version>2.2</version>
            </dependency>
            <dependency>
                <groupId>com.openpojo</groupId>
                <artifactId>openpojo</artifactId>
                <version>0.8.13</version>
            </dependency>
            <dependency>
                <groupId>commons-codec</groupId>
                <artifactId>commons-codec</artifactId>
                <version>1.14</version>
            </dependency>
            <dependency>
                <groupId>com.google.http-client</groupId>
                <artifactId>google-http-client</artifactId>
                <version>1.35.0</version>
            </dependency>

            <!--Jackson-->
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-databind</artifactId>
                <version>${jackson.version}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.dataformat</groupId>
                <artifactId>jackson-dataformat-xml</artifactId>
                <version>${jackson.version}</version>
            </dependency>


            <!--Mock Dependencies-->
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-junit-jupiter</artifactId>
                <version>${mockito.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest</artifactId>
                <version>2.2</version>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>${mockito.version}</version>
            </dependency>

            <!--Junit-->
            <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter</artifactId>
                <version>${junit.jupiter.version}</version>
            </dependency>
            <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter-api</artifactId>
                <version>${junit.jupiter.version}</version>
            </dependency>
            <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter-engine</artifactId>
                <version>${junit.jupiter.version}</version>
            </dependency>
            <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter-params</artifactId>
                <version>${junit.jupiter.version}</version>
            </dependency>
            <dependency>
                <groupId>org.junit.vintage</groupId>
                <artifactId>junit-vintage-engine</artifactId>
                <version>${junit.jupiter.version}</version>
            </dependency>
            <dependency>
                <groupId>org.junit</groupId>
                <artifactId>junit-bom</artifactId>
                <version>${junit.jupiter.version}</version>
                <type>pom</type>
            </dependency>
            <dependency>
                <groupId>org.junit.platform</groupId>
                <artifactId>junit-platform-launcher</artifactId>
                <version>${junit.version}</version>
            </dependency>
            <dependency>
                <groupId>org.junit.platform</groupId>
                <artifactId>junit-platform-runner</artifactId>
                <version>${junit.version}</version>
            </dependency>
            <dependency>
                <groupId>org.junit.platform</groupId>
                <artifactId>junit-platform-suite-api</artifactId>
                <version>${junit.version}</version>
            </dependency>
            <dependency>
                <groupId>org.junit.platform</groupId>
                <artifactId>junit-platform-engine</artifactId>
                <version>${junit.version}</version>
            </dependency>
            <dependency>
                <groupId>org.junit.platform</groupId>
                <artifactId>junit-platform-commons</artifactId>
                <version>${junit.version}</version>
            </dependency>

            <!--Slf4j-->
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-ext</artifactId>
                <version>1.7.7</version>
            </dependency>

            <!--Couchbase-->
            <dependency>
                <groupId>com.couchbase.client</groupId>
                <artifactId>java-client</artifactId>
                <version>3.1.4</version>
            </dependency>

            <!--Lombok-->
            <dependency>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok</artifactId>
                <version>1.18.18</version>
            </dependency>

            <!--Quarkus-->
            <dependency>
                <groupId>io.quarkus</groupId>
                <artifactId>quarkus-bom</artifactId>
                <version>2.2.1.Final</version>
                <type>pom</type>
                <scope>import</scope>
                <exclusions>
                    <exclusion>
                        <groupId>io.quarkus</groupId>
                        <artifactId>quarkus-ide-launcher</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>io.quarkus</groupId>
                <artifactId>quarkus-spring-web</artifactId>
                <version>2.2.1.Final</version>
                <exclusions>
                    <exclusion>
                        <groupId>io.quarkus</groupId>
                        <artifactId>quarkus-ide-launcher</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

            <!--Springfox Swagger-->
            <dependency>
                <groupId>io.springfox</groupId>
                <artifactId>springfox-swagger2</artifactId>
                <version>${springfox-swagger.version}</version>
            </dependency>
            <dependency>
                <groupId>io.springfox</groupId>
                <artifactId>springfox-core</artifactId>
                <version>${springfox-swagger.version}</version>
            </dependency>
            <dependency>
                <groupId>io.springfox</groupId>
                <artifactId>springfox-spi</artifactId>
                <version>${springfox-swagger.version}</version>
            </dependency>
            <dependency>
                <groupId>io.springfox</groupId>
                <artifactId>springfox-spring-web</artifactId>
                <version>${springfox-swagger.version}</version>
            </dependency>
            <dependency>
                <groupId>io.springfox</groupId>
                <artifactId>springfox-swagger-ui</artifactId>
                <version>${springfox-swagger.version}</version>
            </dependency>
            <dependency>
                <groupId>io.springfox</groupId>
                <artifactId>springfox-spring-webflux</artifactId>
                <version>3.0.0</version>
            </dependency>
            <dependency>
                <groupId>io.springfox</groupId>
                <artifactId>springfox-boot-starter</artifactId>
                <version>${springfox-swagger.version}</version>
            </dependency>

            <!--Swagger Annotations-->
            <dependency>
                <groupId>io.swagger</groupId>
                <artifactId>swagger-annotations</artifactId>
                <version>1.6.2</version>
            </dependency>

        </dependencies>
    </dependencyManagement>

    <!--Plugin Management-->
    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-maven-plugin</artifactId>
                    <version>${spring-boot-framework.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>3.1.0</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>jaxws-maven-plugin</artifactId>
                    <version>2.6</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <version>3.1.2</version>
                    <configuration>
                        <logViolationsToConsole>true</logViolationsToConsole>
                        <skip>true</skip>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.8.1</version>
                    <configuration>
                        <source>${java.version}</source>
                        <target>${java.version}</target>
                    </configuration>
                </plugin>
                <plugin>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>2.6</version>
                </plugin>
                <plugin>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>3.1.0</version>
                    <executions>
                        <execution>
                            <id>dist</id>
                            <phase>package</phase>
                            <goals>
                                <goal>single</goal>
                            </goals>
                            <configuration>
                                <descriptors>
                                    <descriptor>${project.basedir}/assembly.xml</descriptor>
                                </descriptors>
                                <tarLongFileMode>posix</tarLongFileMode>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>2.8</version>
                    <executions>
                        <execution>
                            <id>analyze</id>
                            <goals>
                                <goal>analyze-only</goal>
                            </goals>
                            <configuration>
                                <failOnWarning>false</failOnWarning>
                                <outputXML>true</outputXML>
                                <ignoreNonCompile>true</ignoreNonCompile>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <executions>
                        <execution>
                            <goals>
                                <goal>integration-test</goal>
                                <goal>verify</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <skipITs>true</skipITs>
                    </configuration>
                </plugin>
                <plugin>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.9</version>
                    <dependencies>
                        <dependency>
                            <groupId>com.google.code.findbugs</groupId>
                            <artifactId>jsr305</artifactId>
                            <version>3.0.0</version>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-pmd-plugin</artifactId>
                    <version>3.14.0</version>
                </plugin>
                <plugin>
                    <artifactId>cobertura-maven-plugin</artifactId>
                    <version>2.7</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>findbugs-maven-plugin</artifactId>
                    <version>2.5.5</version>
                    <configuration>
                        <xmlOutput>true</xmlOutput>
                        <!-- Optional directory to put findbugs xdoc xml report -->
                        <xmlOutputDirectory>target/site</xmlOutputDirectory>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>jaxb2-maven-plugin</artifactId>
                    <version>2.3.1</version>
                    <executions>
                        <execution>
                            <phase>generate-sources</phase>
                            <goals>
                                <goal>xjc</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <sources>
                            <source>${basedir}/src/main/resources/xsd/</source>
                        </sources>
                        <outputDirectory>${basedir}/target/xjc/</outputDirectory>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>0.8.5</version>
                    <executions>
                        <execution>
                            <id>pre-unit-test</id>
                            <goals>
                                <goal>prepare-agent</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>post-unit-test</id>
                            <phase>test</phase>
                            <goals>
                                <goal>report</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>report-aggregate</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>report-aggregate</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>coverage-check</id>
                            <goals>
                                <goal>check</goal>
                            </goals>
                            <configuration>
                                <rules>
                                    <rule>
                                        <element>PACKAGE</element>
                                        <limits>
                                            <limit>
                                                <counter>LINE</counter>
                                                <value>COVEREDRATIO</value>
                                                <minimum>25%</minimum>
                                            </limit>
                                            <limit>
                                                <counter>BRANCH</counter>
                                                <value>COVEREDRATIO</value>
                                                <minimum>90%</minimum>
                                            </limit>
                                        </limits>
                                    </rule>
                                </rules>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <artifactId>maven-clean-plugin</artifactId>
                    <version>3.1.0</version>
                </plugin>
                <plugin>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>2.5.2</version>
                </plugin>
                <plugin>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>2.8.2</version>
                </plugin>
                <plugin>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>3.7.1</version>
                </plugin>
                <plugin>
                    <artifactId>maven-project-info-reports-plugin</artifactId>
                    <version>3.0.0</version>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <!--Profiles-->
    <profiles>
        <!--Profile release-->
        <profile>
            <id>release</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <pluginManagement>
                    <plugins>
                        <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://s01.oss.sonatype.org/</nexusUrl>
                                <autoReleaseAfterClose>true</autoReleaseAfterClose>
                            </configuration>
                        </plugin>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-release-plugin</artifactId>
                            <version>3.0.0-M4</version>
                            <configuration>
                                <autoVersionSubmodules>true</autoVersionSubmodules>
                                <useReleaseProfile>false</useReleaseProfile>
                                <releaseProfiles>release</releaseProfiles>
                                <goals>deploy nexus-staging:release</goals>
                            </configuration>
                        </plugin>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-gpg-plugin</artifactId>
                            <version>3.0.1</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>
                                        <passphraseServerId>sign-artifacts</passphraseServerId>
                                    </configuration>
                                </execution>
                            </executions>
                        </plugin>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-javadoc-plugin</artifactId>
                            <version>3.2.0</version>
                            <executions>
                                <execution>
                                    <id>attach-javadocs</id>
                                    <goals>
                                        <goal>jar</goal>
                                    </goals>
                                </execution>
                            </executions>
                            <configuration>
                                <javadocExecutable>${java.home}/bin/javadoc</javadocExecutable>
                            </configuration>
                        </plugin>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-source-plugin</artifactId>
                            <version>3.2.1</version>
                            <executions>
                                <execution>
                                    <id>attach-sources</id>
                                    <goals>
                                        <goal>jar-no-fork</goal>
                                    </goals>
                                </execution>
                            </executions>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>

        <!--Profile americanexpress-->
        <profile>
            <id>americanexpress</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <distributionManagement>
                <repository>
                    <id>bintray-americanexpress-maven</id>
                    <name>americanexpress-maven</name>
                    <url>https://api.bintray.com/maven/americanexpress/maven/io.americanexpress.synapse/;publish=1</url>
                </repository>
            </distributionManagement>
        </profile>
    </profiles>


    <!--Use for Maven Deploy Plugin-->
    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://s01.oss.sonatype.org/content/repositories/releases/</url>
        </repository>
    </distributionManagement>

    <!--
    Maven Central Distribution Urls:

    Snapshot Distribution Location
            - https://s01.oss.sonatype.org/content/repositories/snapshots/
    Staging Distribution Location:
            - https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/
    Release Distribution Location:
            - https://s01.oss.sonatype.org/content/repositories/releases/
    -->


    <scm>
        <url>https://github.com/americanexpress/synapse</url>
        <connection>scm:git:https://github.com/americanexpress/synapse.git</connection>
        <developerConnection>scm:git:ssh://git@github.com/americanexpress/synapse.git</developerConnection>
        <tag>synapse-0.1.0</tag>
    </scm>

    <issueManagement>
        <system>GitHub Issues</system>
        <url>https://github.com/americanexpress/synapse/issues</url>
    </issueManagement>

    <licenses>
        <license>
            <name>The Apache License, Version 2.0</name>
            <url>./LICENSE</url>
        </license>
    </licenses>

</project>
