<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright (c) 2018-2019 Contributors to the Eclipse Foundation

    See the NOTICE file(s) distributed with this work for additional
    information regarding copyright ownership.

    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>org.eclipse.microprofile.reactive.messaging</groupId>
    <artifactId>microprofile-reactive-messaging-parent</artifactId>
    <version>1.0</version>
    <packaging>pom</packaging>

    <name>MicroProfile Reactive Messaging</name>
    <description>Eclipse MicroProfile Reactive Messaging :: Parent POM</description>

    <url>http://microprofile.io</url>
    <inceptionYear>2018</inceptionYear>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>

        <microprofile.reactive.streams.operators.version>1.0</microprofile.reactive.streams.operators.version>

        <checkstyle.version>3.0.0</checkstyle.version>
        <checkstyle.methodNameFormat>^_?[a-z][a-zA-Z0-9]*$</checkstyle.methodNameFormat>
        <!-- whether autorelease maven central staging repositories - default true to allow review and manually release repositories -->
        <autorelease>false</autorelease>
        <!-- keeping closed repos with failure - default is false because the errors are visible in the maven output, but true will leave the repo open for investigation in Sonatype Nexus -->
        <keepStagingReposOnFailure>false</keepStagingReposOnFailure>
        <microprofile-config-api.version>1.3</microprofile-config-api.version>
        <cdi-api.version>2.0</cdi-api.version>
    </properties>

    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
            <comments>A business-friendly OSS license</comments>
        </license>
    </licenses>

    <organization>
        <name>Eclipse Foundation</name>
        <url>http://www.eclipse.org/</url>
    </organization>

    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/eclipse/microprofile-reactive/issues</url>
    </issueManagement>

    <developers>
        <developer>
            <name>James Roper</name>
            <url>https://jazzy.id.au</url>
            <organization>Lightbend</organization>
            <organizationUrl>https://www.lightbend.com</organizationUrl>
        </developer>
        <developer>
            <name>Clement Escoffier</name>
            <organization>Red Hat</organization>
            <organizationUrl>https://redhat.com</organizationUrl>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:https://github.com/eclipse/microprofile-reactive-messaging.git</connection>
        <developerConnection>scm:git:git@github.com:eclipse/microprofile-reactive-messaging.git</developerConnection>
        <url>https://github.com/eclipse/microprofile-reactive-messaging</url>
        <tag>1.0</tag>
    </scm>

    <distributionManagement>
        <repository>
            <id>ossrh</id>
            <name>Sonatype OSSRH - Release Staging Area</name>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
        <snapshotRepository>
            <id>ossrh</id>
            <name>Sonatype OSSRH Snapshots</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
            <uniqueVersion>true</uniqueVersion>
        </snapshotRepository>
    </distributionManagement>

    <modules>
        <module>api</module>
        <module>tck</module>
        <module>spec</module>
    </modules>

    <pluginRepositories>
        <pluginRepository>
            <id>repo.eclipse.org</id>
            <name>Project Repository - Releases</name>
            <url>https://repo.eclipse.org/content/groups/cbi/</url>
        </pluginRepository>
        <pluginRepository>
            <id>microprofile.repo.eclipse.org</id>
            <name>Microprofile Project Repository - Releases</name>
            <url>https://repo.eclipse.org/content/groups/microprofile/</url>
        </pluginRepository>
    </pluginRepositories>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.eclipse.microprofile.reactive-streams-operators</groupId>
                <artifactId>microprofile-reactive-streams-operators-api</artifactId>
                <version>${microprofile.reactive.streams.operators.version}</version>
            </dependency>
            <dependency>
                <groupId>org.eclipse.microprofile.config</groupId>
                <artifactId>microprofile-config-api</artifactId>
                <version>${microprofile-config-api.version}</version>
            </dependency>
            <dependency>
                <groupId>org.osgi</groupId>
                <artifactId>org.osgi.annotation.versioning</artifactId>
                <version>1.0.0</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.testng</groupId>
                <artifactId>testng</artifactId>
                <version>6.11</version>
            </dependency>
            <dependency>
                <groupId>org.awaitility</groupId>
                <artifactId>awaitility</artifactId>
                <version>3.1.6</version>
            </dependency>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.12</version>
            </dependency>
            <dependency>
                <groupId>org.assertj</groupId>
                <artifactId>assertj-core</artifactId>
                <version>3.12.0</version>
            </dependency>
            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest-all</artifactId>
                <version>1.3</version>
            </dependency>
            <dependency>
                <groupId>javax.enterprise</groupId>
                <artifactId>cdi-api</artifactId>
                <version>${cdi-api.version}</version>
            </dependency>
            <dependency>
                <groupId>javax.json.bind</groupId>
                <artifactId>javax.json.bind-api</artifactId>
                <version>1.0</version>
            </dependency>
            <dependency>
                <groupId>org.jboss.arquillian</groupId>
                <artifactId>arquillian-bom</artifactId>
                <version>1.4.0.Final</version>
                <scope>import</scope>
                <type>pom</type>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>2.5.3</version>
                    <configuration>
                        <autoVersionSubmodules>true</autoVersionSubmodules>
                        <localCheckout>true</localCheckout>
                        <useReleaseProfile>false</useReleaseProfile>
                        <arguments>${arguments} -Prelease -Drevremark=${revremark}</arguments>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.eclipse.cbi.maven.plugins</groupId>
                    <artifactId>eclipse-jarsigner-plugin</artifactId>
                    <version>1.1.4</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <version>${checkstyle.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>3.0.2</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>3.0.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>2.10.4</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>1.6</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.eclipse.microprofile.maven</groupId>
                <artifactId>microprofile-maven-build-extension</artifactId>
                <version>1.0</version>
                <extensions>true</extensions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <executions>
                    <execution>
                        <id>verify-style</id>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>checkstyle-aggregate</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <encoding>UTF-8</encoding>
                    <consoleOutput>true</consoleOutput>
                    <failOnViolation>true</failOnViolation>
                    <includeTestSourceDirectory>true</includeTestSourceDirectory>
                    <failsOnError>true</failsOnError>
                    <linkXRef>true</linkXRef>
                    <logViolationsToConsole>true</logViolationsToConsole>
                    <configLocation>${project.basedir}/mp_checkstyle_rules.xml</configLocation>
                </configuration>
            </plugin>

            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>3.0</version>
                <configuration>
                    <aggregate>true</aggregate>
                    <header>src/license/license.txt</header>
                    <properties>
                        <year>2019</year>
                        <owner>Eclipse MicroProfile</owner>
                    </properties>
                    <mapping>
                        <asciidoc>DOUBLESLASH_STYLE</asciidoc>
                    </mapping>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>format</goal>
                        </goals>
                        <phase>verify</phase>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.rat</groupId>
                <artifactId>apache-rat-plugin</artifactId>
                <version>0.12</version>
                <executions>
                    <execution>
                        <id>rat-check</id>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <excludes>
                        <exclude>**/*.svg</exclude>
                        <exclude>**/target</exclude>
                        <exclude>.travis.yml.*</exclude>
                        <exclude>bnd.bnd</exclude>
                        <exclude>*.log</exclude>
                        <exclude>.checkstyle</exclude>
                        <exclude>.factorypath</exclude>
                        <exclude>.editorconfig</exclude>
                        <exclude>**/META-INF/services/*</exclude>
                    </excludes>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.3</version>
                        <extensions>true</extensions>
                        <configuration>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <serverId>ossrh</serverId>
                            <autoReleaseAfterClose>${autorelease}</autoReleaseAfterClose>
                            <keepStagingRepositoryOnCloseRuleFailure>${keepStagingReposOnFailure}
                            </keepStagingRepositoryOnCloseRuleFailure>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <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>
                        <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>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <!-- This allows custom deployments to arbitrary repositories,
                 these properties are probably best set with profiles in
                 settings.xml
            -->
            <id>custom-deploy</id>
            <distributionManagement>
                <repository>
                    <id>${custom-deploy.id}</id>
                    <url>${custom-deploy.url}</url>
                </repository>
                <snapshotRepository>
                    <id>${custom-deploy.id}</id>
                    <url>${custom-deploy.url}</url>
                </snapshotRepository>
            </distributionManagement>
        </profile>
    </profiles>
</project>
