<?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>org.dominokit</groupId>
    <artifactId>domino-rest</artifactId>
    <version>1.0.0-RC2</version>
    <packaging>pom</packaging>

    <name>domino-rest</name>
    <description>Domino rest</description>
    <url>https://github.com/DominoKit/domino-rest</url>

    <organization>
        <name>Dominokit</name>
        <url>https://github.com/DominoKit</url>
    </organization>

    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Ahmad K. Bawaneh</name>
            <email>akabme@gmail.com</email>
        </developer>
        <developer>
            <name>Rafat J. Al-Barouki</name>
            <email>rafat.albarouki@gmail.com</email>
        </developer>
    </developers>

    <issueManagement>
        <url>https://github.com/DominoKit/domino-rest/issues</url>
        <system>GitHub Issues</system>
    </issueManagement>

    <inceptionYear>2019</inceptionYear>

    <scm>
        <connection>scm:git:https://github.com/DominoKit/domino-rest.git</connection>
        <developerConnection>scm:git:git@github.com:DominoKit/domino-rest.git</developerConnection>
        <url>https://github.com/DominoKit/domino-rest</url>
    </scm>

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

    <modules>
        <module>domino-rest-shared</module>
        <module>domino-rest-test</module>
        <module>domino-rest-processor</module>
        <module>domino-rest-jaxrs</module>
        <module>domino-rest-client</module>
        <module>domino-rest-jvm</module>
    </modules>

    <properties>
        <snapshot.version>HEAD-SNAPSHOT</snapshot.version>
        <next.release.version>1.0.0-RC2</next.release.version>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

        <maven.compiler.plugin>3.8.1</maven.compiler.plugin>
        <maven.source.plugin>3.0.1</maven.source.plugin>
        <maven.javadoc.plugin>2.10.4</maven.javadoc.plugin>
        <maven.gpg.plugin>1.6</maven.gpg.plugin>
        <maven.nexus.staging.plugin>1.6.8</maven.nexus.staging.plugin>
        <maven.deploy.plugin>3.0.0-M1</maven.deploy.plugin>
        <maven.fmt.plugin>2.9</maven.fmt.plugin>
        <maven.install.plugin>3.0.0-M1</maven.install.plugin>
        <maven.license.plugin>3.0</maven.license.plugin>
        <maven.surfire.plugin>3.0.0-M1</maven.surfire.plugin>
        <maven.gwt.plugin>1.0.0</maven.gwt.plugin>
        <gwt.version>2.9.0</gwt.version>
        <domino.logger.version>1.0.2</domino.logger.version>
        <domino.jackson.version>1.0.0-RC3</domino.jackson.version>
        <domino.history.version>1.0.0-RC2</domino.history.version>
        <domino.aggregator.version>1.0.2</domino.aggregator.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.google.gwt</groupId>
                <artifactId>gwt</artifactId>
                <version>${gwt.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <!-- fix inconsistent versions in gwt-dev -->
            <dependency>
                <groupId>commons-codec</groupId>
                <artifactId>commons-codec</artifactId>
                <version>1.10</version>
            </dependency>
            <dependency>
                <groupId>xml-apis</groupId>
                <artifactId>xml-apis</artifactId>
                <version>1.4.01</version>
            </dependency>
            <!-- end inconsistent versions in gwt-dev -->
            <dependency>
                <groupId>javax.servlet</groupId>
                <artifactId>javax.servlet-api</artifactId>
                <version>3.1.0</version>
            </dependency>
            <dependency>
                <groupId>javax.annotation</groupId>
                <artifactId>javax.annotation-api</artifactId>
                <version>1.3.2</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven.compiler.plugin}</version>
                <configuration>
                    <source>${maven.compiler.source}</source>
                    <target>${maven.compiler.target}</target>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-source-plugin</artifactId>
                <version>${maven.source.plugin}</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <phase>package</phase>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${maven.javadoc.plugin}</version>
                <configuration>
                    <failOnError>false</failOnError>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.coveo</groupId>
                <artifactId>fmt-maven-plugin</artifactId>
                <version>${maven.fmt.plugin}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>${maven.license.plugin}</version>
                <configuration>
                    <header>LICENSE.header</header>
                    <encoding>${project.build.sourceEncoding}</encoding>
                    <skipExistingHeaders>true</skipExistingHeaders>
                    <mapping>
                        <java>SLASHSTAR_STYLE</java>
                    </mapping>
                    <excludes>
                        <exclude>**/README.md</exclude>
                        <exclude>**/LICENSE</exclude>
                        <exclude>**/LICENSE.header</exclude>
                        <exclude>**/AUTHORS</exclude>
                        <exclude>**/src/test/resources/**</exclude>
                        <exclude>**/src/main/resources/**</exclude>
                        <exclude>**/war</exclude>
                        <exclude>**/pom.xml</exclude>
                        <exclude>**/.flattened-pom.xml</exclude>
                        <exclude>**/gwt-unitcache</exclude>
                        <exclude>**/.mvn/*.*</exclude>
                    </excludes>
                    <properties>
                        <year>${project.inceptionYear}</year>
                        <name>${project.organization.name}</name>
                    </properties>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>${maven.deploy.plugin}</version>
                <configuration>
                    <skip>true</skip>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.dominokit</groupId>
                <artifactId>gitflow-maven-plugin</artifactId>
                <version>1.0.0</version>
                <configuration>
                    <snapshotVersionProperty>snapshot.version</snapshotVersionProperty>
                    <releaseVersionProperty>next.release.version</releaseVersionProperty>
                    <!-- Set to true to immediately bump the development version when creating a release branch -->
                    <commitDevelopmentVersionAtStart>true</commitDevelopmentVersionAtStart>

                    <!-- Which digit to increas in major.minor.patch versioning, the values being 0.1.2 respectively.
                         By default the rightmost number is increased.
                         Pass in the number via parameter or profile to allow configuration,
                         since everything set in the file can't be overwritten via command line -->
                    <versionDigitToIncrement>${bump.digit}</versionDigitToIncrement>

                    <!-- Execute mvn verify before release -->
                    <preReleaseGoals>verify</preReleaseGoals>
                    <preHotfixGoals>verify</preHotfixGoals>

                    <!-- Configure branches -->
                    <gitFlowConfig>
                        <productionBranch>master</productionBranch>
                        <!-- default is develop, but we use development -->
                        <developmentBranch>development</developmentBranch>
                    </gitFlowConfig>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.12.4</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>3.0.0-M3</version>
                <executions>
                    <execution>
                        <id>enforce</id>
                        <configuration>
                            <rules>
                                <dependencyConvergence/>
                            </rules>
                        </configuration>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>${maven.gpg.plugin}</version>
                    <executions>
                        <execution>
                            <id>sign-artifacts</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>sign</goal>
                            </goals>
                            <configuration>
                                <!-- Prevent `gpg` from using pinentry programs -->
                                <gpgArguments>
                                    <arg>--pinentry-mode</arg>
                                    <arg>loopback</arg>
                                </gpgArguments>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.sonatype.plugins</groupId>
                    <artifactId>nexus-staging-maven-plugin</artifactId>
                    <version>${maven.nexus.staging.plugin}</version>
                    <extensions>true</extensions>
                    <configuration>
                        <serverId>ossrh</serverId>
                        <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                        <autoReleaseAfterClose>false</autoReleaseAfterClose>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>net.ltgt.gwt.maven</groupId>
                    <artifactId>gwt-maven-plugin</artifactId>
                    <version>${maven.gwt.plugin}</version>
                    <extensions>true</extensions>
                    <configuration>
                        <sourceLevel>1.8</sourceLevel>
                        <failOnError>true</failOnError>
                        <useCompilerArgsForTests>true</useCompilerArgsForTests>
                        <codeserverArgs>
                            <arg>-generateJsInteropExports</arg>
                        </codeserverArgs>
                        <compilerArgs>
                            <compilerArg>-generateJsInteropExports</compilerArg>
                        </compilerArgs>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <profiles>
        <profile>
            <id>production</id>
            <activation>
                <property>
                    <name>ci</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
