<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (C) 2013 Xavier HANIN
  ~
  ~ 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.restx</groupId>
    <artifactId>restx-parent</artifactId>
    <version>1.0.0-rc3</version>
    <packaging>pom</packaging>
    <name>RESTX</name>
    <description>RESTX is a full lightweight disrupting stack, which includes Swagger-like ui &amp; considers REST specs tests as docs.</description>
    <url>http://restx.io</url>
    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    <issueManagement>
        <system>github</system>
        <url>https://github.com/restx/restx/issues</url>
    </issueManagement>
    <developers>
        <developer>
            <id>xhanin</id>
            <name>Xavier Hanin</name>
            <email>xavier dot hanin at gmail dot com</email>
        </developer>
    </developers>
    <scm>
        <connection>scm:git:git@github.com:restx/restx.git</connection>
        <developerConnection>scm:git:git@github.com:restx/restx.git</developerConnection>
        <url>git@github.com:restx/restx</url>
    </scm>

    <properties>
        <!-- RestX -->
        <restx.version>1.0.0-rc3</restx.version>
        <restx.shell.version>1.0</restx.shell.version>

        <!-- Compiler -->
        <maven.compiler.source>17</maven.compiler.source>
        <maven.compiler.target>17</maven.compiler.target>

        <!-- 3rd party libs -->
        <jackson.version>2.15.2</jackson.version>
        <guava.version>32.0.1-jre</guava.version>
        <joda-time.version>2.12.5</joda-time.version>
        <jna.version>5.13.0</jna.version>
        <slf4j-api.version>1.7.30</slf4j-api.version>
        <logback.version>1.2.3</logback.version>
        <javax.inject.version>1</javax.inject.version>
        <mustache.version>1.15</mustache.version>
        <reflections.version>0.9.9-RC1</reflections.version>
        <snakeyaml.version>2.0</snakeyaml.version>
        <validation-api.version>1.1.0.Final</validation-api.version>
        <ivy.version>2.3.0</ivy.version>
        <jbcrypt.version>0.4</jbcrypt.version>
        <metrics.version>3.1.0</metrics.version>
        <http-request.version>6.0</http-request.version>
        <janino.version>2.6.1</janino.version>
        <jline.version>2.11</jline.version>
        <diffutils.version>1.3.0</diffutils.version>
        <hibernate-validator.version>5.0.1.Final</hibernate-validator.version>
        <el.api.version>2.2</el.api.version>
        <servlet-api.version>5.0.0</servlet-api.version>

        <!-- Mongo modules -->
        <mongo-java-driver.version>4.8.2</mongo-java-driver.version>
        <jongo.version>1.5.1</jongo.version>
        <de.flapdoodle.embed.version>2.2.0</de.flapdoodle.embed.version>

        <!-- Test libs -->
        <junit.version>4.13.2</junit.version>
        <junit.toolbox.version>2.3</junit.toolbox.version>
        <assertj-core.version>3.24.2</assertj-core.version>
        <maven-verifier.version>1.4</maven-verifier.version>
        <mockito.version>3.3.3</mockito.version>

        <!-- Plugins -->
        <maven.javadoc.plugin.version>3.5.0</maven.javadoc.plugin.version>

        <!-- Used by maven release -->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <sonatypeOssDistMgmtSnapshotsUrl>https://oss.sonatype.org/content/repositories/snapshots/</sonatypeOssDistMgmtSnapshotsUrl>
        <arguments />
    </properties>

    <dependencyManagement>
        <dependencies>
            <!-- RESTX modules -->
            <dependency>
                <groupId>io.restx</groupId>
                <artifactId>restx-common</artifactId>
                <version>${restx.version}</version>
            </dependency>
            <dependency>
                <groupId>io.restx</groupId>
                <artifactId>restx-factory</artifactId>
                <version>${restx.version}</version>
            </dependency>
            <dependency>
                <groupId>io.restx</groupId>
                <artifactId>restx-factory-annotation-processor</artifactId>
                <version>${restx.version}</version>
            </dependency>
            <dependency>
                <groupId>io.restx</groupId>
                <artifactId>restx-core</artifactId>
                <version>${restx.version}</version>
            </dependency>
            <dependency>
                <groupId>io.restx</groupId>
                <artifactId>restx-core-annotation-processor</artifactId>
                <version>${restx.version}</version>
            </dependency>
            <dependency>
                <groupId>io.restx</groupId>
                <artifactId>restx-admin</artifactId>
                <version>${restx.version}</version>
            </dependency>
            <dependency>
                <groupId>io.restx</groupId>
                <artifactId>restx-webjars</artifactId>
                <version>${restx.version}</version>
            </dependency>
            <dependency>
                <groupId>io.restx</groupId>
                <artifactId>restx-security-basic</artifactId>
                <version>${restx.version}</version>
            </dependency>
            <dependency>
                <groupId>io.restx</groupId>
                <artifactId>restx-classloader</artifactId>
                <version>${restx.version}</version>
            </dependency>
            <!--            <dependency>-->
            <!--                <groupId>io.restx</groupId>-->
            <!--                <artifactId>restx-apidocs-doclet</artifactId>-->
            <!--                <version>${restx.version}</version>-->
            <!--            </dependency>-->
            <dependency>
                <groupId>io.restx</groupId>
                <artifactId>restx-specs-tests</artifactId>
                <version>${restx.version}</version>
            </dependency>
            <dependency>
                <groupId>io.restx</groupId>
                <artifactId>restx-server-simple</artifactId>
                <version>${restx.version}</version>
            </dependency>
            <dependency>
                <groupId>io.restx</groupId>
                <artifactId>restx-i18n</artifactId>
                <version>${restx.version}</version>
            </dependency>
            <dependency>
                <groupId>io.restx</groupId>
                <artifactId>restx-jongo</artifactId>
                <version>${restx.version}</version>
            </dependency>
            <dependency>
                <groupId>io.restx</groupId>
                <artifactId>restx-monitor-codahale</artifactId>
                <version>${restx.version}</version>
            </dependency>
            <dependency>
                <groupId>io.restx</groupId>
                <artifactId>restx-validation</artifactId>
                <version>${restx.version}</version>
            </dependency>
            <dependency>
                <groupId>io.restx</groupId>
                <artifactId>restx-factory-admin</artifactId>
                <version>${restx.version}</version>
            </dependency>
            <dependency>
                <groupId>io.restx</groupId>
                <artifactId>restx-monitor-admin</artifactId>
                <version>${restx.version}</version>
            </dependency>
            <dependency>
                <groupId>io.restx</groupId>
                <artifactId>restx-servlet</artifactId>
                <version>${restx.version}</version>
            </dependency>
            <dependency>
                <groupId>io.restx</groupId>
                <artifactId>restx-apidocs</artifactId>
                <version>${restx.version}</version>
            </dependency>
            <dependency>
                <groupId>io.restx</groupId>
                <artifactId>restx-specs-admin</artifactId>
                <version>${restx.version}</version>
            </dependency>
            <dependency>
                <groupId>io.restx</groupId>
                <artifactId>restx-barbarywatch</artifactId>
                <version>${restx.version}</version>
            </dependency>
            <dependency>
                <groupId>io.restx</groupId>
                <artifactId>restx-i18n-admin</artifactId>
                <version>${restx.version}</version>
            </dependency>
            <dependency>
                <groupId>io.restx</groupId>
                <artifactId>restx-jongo-specs-tests</artifactId>
                <version>${restx.version}</version>
            </dependency>
            <dependency>
                <groupId>io.restx</groupId>
                <artifactId>restx-server-jetty11</artifactId>
                <version>${restx.version}</version>
            </dependency>
            <dependency>
                <groupId>io.restx</groupId>
                <artifactId>restx-server-tomcat</artifactId>
                <version>${restx.version}</version>
            </dependency>
            <dependency>
                <groupId>io.restx</groupId>
                <artifactId>restx-specs-server</artifactId>
                <version>${restx.version}</version>
            </dependency>
            <dependency>
                <groupId>io.restx</groupId>
                <artifactId>restx-md-fragments</artifactId>
                <version>${restx.version}</version>
            </dependency>

            <!-- Jackson -->
            <dependency>
                <groupId>com.fasterxml.jackson.module</groupId>
                <artifactId>jackson-module-jsonSchema</artifactId>
                <version>${jackson.version}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-core</artifactId>
                <version>${jackson.version}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-annotations</artifactId>
                <version>${jackson.version}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-databind</artifactId>
                <version>${jackson.version}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.datatype</groupId>
                <artifactId>jackson-datatype-guava</artifactId>
                <version>${jackson.version}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.datatype</groupId>
                <artifactId>jackson-datatype-joda</artifactId>
                <version>${jackson.version}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.datatype</groupId>
                <artifactId>jackson-datatype-jsr310</artifactId>
                <version>${jackson.version}</version>
            </dependency>

            <!-- Guava -->
            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>${guava.version}</version>
            </dependency>

            <!-- Joda -->
            <dependency>
                <groupId>joda-time</groupId>
                <artifactId>joda-time</artifactId>
                <version>${joda-time.version}</version>
            </dependency>

            <!-- JNA -->
            <dependency>
                <groupId>net.java.dev.jna</groupId>
                <artifactId>jna</artifactId>
                <version>${jna.version}</version>
            </dependency>

            <!-- Java Inject -->
            <dependency>
                <groupId>javax.inject</groupId>
                <artifactId>javax.inject</artifactId>
                <version>${javax.inject.version}</version>
            </dependency>

            <!-- Validation -->
            <dependency>
                <groupId>javax.validation</groupId>
                <artifactId>validation-api</artifactId>
                <version>${validation-api.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-validator</artifactId>
                <version>${hibernate-validator.version}</version>
            </dependency>
            <dependency>
                <groupId>javax.el</groupId>
                <artifactId>el-api</artifactId>
                <version>${el.api.version}</version>
            </dependency>
            <dependency>
                <groupId>org.glassfish.web</groupId>
                <artifactId>el-impl</artifactId>
                <version>${el.api.version}</version>
            </dependency>

            <!-- Reflections -->
            <dependency>
                <groupId>org.reflections</groupId>
                <artifactId>reflections</artifactId>
                <version>${reflections.version}</version>
            </dependency>

            <!-- JBcrypt -->
            <dependency>
                <groupId>org.mindrot</groupId>
                <artifactId>jbcrypt</artifactId>
                <version>${jbcrypt.version}</version>
            </dependency>

            <!-- JMustache -->
            <dependency>
                <groupId>com.samskivert</groupId>
                <artifactId>jmustache</artifactId>
                <version>${mustache.version}</version>
            </dependency>

            <!-- Snake YAML -->
            <dependency>
                <groupId>org.yaml</groupId>
                <artifactId>snakeyaml</artifactId>
                <version>${snakeyaml.version}</version>
            </dependency>

            <!-- Logging -->
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${slf4j-api.version}</version>
            </dependency>
            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-classic</artifactId>
                <version>${logback.version}</version>
            </dependency>

            <!-- Metrics -->
            <dependency>
                <groupId>io.dropwizard.metrics</groupId>
                <artifactId>metrics-core</artifactId>
                <version>${metrics.version}</version>
            </dependency>
            <dependency>
                <groupId>io.dropwizard.metrics</groupId>
                <artifactId>metrics-healthchecks</artifactId>
                <version>${metrics.version}</version>
            </dependency>
            <dependency>
                <groupId>io.dropwizard.metrics</groupId>
                <artifactId>metrics-jvm</artifactId>
                <version>${metrics.version}</version>
            </dependency>
            <dependency>
                <groupId>io.dropwizard.metrics</groupId>
                <artifactId>metrics-graphite</artifactId>
                <version>${metrics.version}</version>
            </dependency>

            <!-- Janino -->
            <dependency>
                <groupId>org.codehaus.janino</groupId>
                <artifactId>janino</artifactId>
                <version>${janino.version}</version>
            </dependency>

            <!-- Mongo modules -->
            <dependency>
                <groupId>org.mongodb</groupId>
                <artifactId>mongodb-driver-legacy</artifactId>
                <version>${mongo-java-driver.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jongo</groupId>
                <artifactId>jongo</artifactId>
                <version>${jongo.version}</version>
            </dependency>
            <dependency>
                <groupId>de.flapdoodle.embed</groupId>
                <artifactId>de.flapdoodle.embed.mongo</artifactId>
                <version>${de.flapdoodle.embed.version}</version>
            </dependency>

            <!-- HTTP Request -->
            <dependency>
                <groupId>com.github.kevinsawicki</groupId>
                <artifactId>http-request</artifactId>
                <version>${http-request.version}</version>
            </dependency>

            <!-- Diff utils -->
            <dependency>
                <groupId>com.googlecode.java-diff-utils</groupId>
                <artifactId>diffutils</artifactId>
                <version>${diffutils.version}</version>
            </dependency>

            <!-- Tests -->
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${junit.version}</version>
            </dependency>
            <dependency>
                <groupId>org.assertj</groupId>
                <artifactId>assertj-core</artifactId>
                <version>${assertj-core.version}</version>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>${mockito.version}</version>
            </dependency>
            <dependency>
                <groupId>io.restx</groupId>
                <artifactId>restx-build</artifactId>
                <version>${restx.shell.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.maven.shared</groupId>
                <artifactId>maven-verifier</artifactId>
                <version>${maven-verifier.version}</version>
            </dependency>
            <dependency>
                <!-- For parallel Parameterized tests execution -->
                <groupId>com.googlecode.junit-toolbox</groupId>
                <artifactId>junit-toolbox</artifactId>
                <version>${junit.toolbox.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <repositories>
        <repository>
            <id>sonatype-nexus-snapshots</id>
            <name>Sonatype Nexus Snapshots</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
    </repositories>

    <distributionManagement>
        <snapshotRepository>
            <id>sonatype-nexus-snapshots</id>
            <name>Sonatype Nexus Snapshots</name>
            <url>${sonatypeOssDistMgmtSnapshotsUrl}</url>
        </snapshotRepository>
        <repository>
            <id>sonatype-nexus-staging</id>
            <name>Nexus Release Repository</name>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.11.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>3.3.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>3.1.2</version>
                    <configuration>
                        <argLine>-Duser.timezone=UTC</argLine>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>3.6.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-war-plugin</artifactId>
                    <version>3.4.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>2.1</version>
                    <configuration>
                        <mavenExecutorId>forked-path</mavenExecutorId>
                        <useReleaseProfile>false</useReleaseProfile>
                        <arguments>${arguments} -Psonatype-oss-release</arguments>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.3.0</version>
                <executions>
                    <execution>
                        <id>attach-source</id>
                        <phase>post-integration-test</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${maven.javadoc.plugin.version}</version>
                <executions>
                    <execution>
                        <id>attach-docs</id>
                        <!--
                            we generate javadoc before packaging the jar to let a chance to apidocs doclet
                            to generate comments dictionary to be packaged inside the jar as a resource
                            -->
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>sonatype-oss-release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>3.5.0</version>
                        <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>
                        <version>3.1.0</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <configuration>
                                    <!-- Prevent gpg from using pinentry programs. Fixes: gpg: signing
                                        failed: Inappropriate ioctl for device -->
                                    <gpgArguments>
                                        <arg>--pinentry-mode</arg>
                                        <arg>loopback</arg>
                                    </gpgArguments>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <modules>
        <module>restx-common</module>
        <module>restx-factory</module>
        <module>restx-factory-annotation-processor</module>
        <module>restx-factory-testing</module>
        <module>restx-barbarywatch</module>
        <module>restx-classloader</module>
        <module>restx-core-annotation-processor</module>
        <module>restx-security-basic</module>
        <module>restx-core</module>
        <module>restx-annotation-processors-package</module>
        <module>restx-admin</module>
        <module>restx-i18n</module>
        <module>restx-i18n-admin</module>
        <module>restx-apidocs</module>
        <!--        <module>restx-apidocs-doclet</module>-->
        <module>restx-monitor-admin</module>
        <module>restx-monitor-codahale</module>
        <module>restx-factory-admin</module>
        <module>restx-stats-admin</module>
        <module>restx-log-admin</module>
        <module>restx-specs-tests</module>
        <module>restx-specs-admin</module>
        <module>restx-specs-server</module>
        <module>restx-jongo</module>
        <!--        <module>restx-jongo-specs-tests</module>-->
        <module>restx-servlet</module>
        <module>restx-server-jetty11</module>
        <module>restx-server-tomcat</module>
        <module>restx-server-simple</module>
        <module>restx-server-testing</module>
        <module>restx-samplest</module>
        <module>restx-validation</module>
        <module>restx-webjars</module>
        <module>restx-md-fragments</module>
        <!--        <module>restx-md-testing</module>-->
        <!--        <module>restx-api-doclet-test</module>-->
        <module>restx-annotation-processor-tests-java8</module>
        <module>restx-samplest-kotlin</module>
    </modules>
</project>
