<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.oracle.bedrock</groupId>
    <artifactId>project</artifactId>
    <version>7.0.6</version>

    <packaging>pom</packaging>

    <name>Bedrock Project</name>

    <description>
        A framework for the development, orchestration and testing of
        concurrent and distributed applications.

        Developed as part of the Oracle Coherence Community, though Oracle
        Coherence is not really required.
    </description>

    <url>https://github.com/coherence-community/oracle-bedrock</url>

    <licenses>
        <license>
            <name>Common Development and Distribution License 1.0 ("CDDL")</name>
            <url>http://opensource.org/licenses/CDDL-1.0</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Jonathan Knight</name>
            <organization>Oracle Corporation</organization>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:https://github.com/coherence-community/oracle-bedrock.git</connection>
        <developerConnection>scm:git:https://github.com/coherence-community/oracle-bedrock.git</developerConnection>
        <url>https://github.com/coherence-community/oracle-bedrock.git</url>
      <tag>project-7.0.6</tag>
    </scm>

    <modules>
        <module>bedrock-core</module>

        <module>bedrock-runtime</module>
        <module>bedrock-runtime-tests</module>

        <module>bedrock-runtime-maven</module>
        <module>bedrock-runtime-maven-tests</module>

        <module>bedrock-runtime-jacoco</module>

        <module>bedrock-testing-support</module>
        <module>bedrock-testing-support-tests</module>

        <module>bedrock-runtime-remote</module>
        <module>bedrock-runtime-remote-tests</module>

        <module>bedrock-runtime-virtual</module>
        <module>bedrock-runtime-virtual-tests</module>

        <module>bedrock-runtime-windows</module>
        <module>bedrock-runtime-windows-tests</module>

        <module>bedrock-runtime-docker</module>
        <module>bedrock-runtime-docker-tests</module>

        <module>bedrock-runtime-vagrant</module>
        <module>bedrock-runtime-vagrant-tests</module>

        <module>bedrock-coherence</module>

        <module>bedrock-bom</module>
    </modules>

    <properties>
        <!-- project options -->
        <skip-sign-artifacts>true</skip-sign-artifacts>
        <skip-remote-tests>true</skip-remote-tests>

        <!--
            defines the maven.java.net repository that should be targeted for download links
            when generating the latest project documentation valid options: snapshots, releases
          -->
        <repository>snapshots</repository>

        <!-- the version of java required to build -->
        <java.version.enforcer>11</java.version.enforcer>
        <java.version>11</java.version>
        <maven.compiler.source>11</maven.compiler.source>
        <maven.compiler.target>11</maven.compiler.target>

        <maven.version>3.6</maven.version>

        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <!-- plugin dependency versions -->
        <maven.compiler.plugin.version>3.10.1</maven.compiler.plugin.version>
        <maven.deploy.plugin.version>3.0.0-M2</maven.deploy.plugin.version>
        <maven.doxia.markdown.plugin.version>2.0.0-M2</maven.doxia.markdown.plugin.version>
        <maven.enforcer.plugin.version>3.0.0</maven.enforcer.plugin.version>
        <maven.failsafe.plugin.version>3.1.2</maven.failsafe.plugin.version>
        <maven.flatten.plugin.version>1.2.7</maven.flatten.plugin.version>
        <maven.gpg.plugin.version>3.0.1</maven.gpg.plugin.version>
        <maven.install.plugin.version>3.0.0-M1</maven.install.plugin.version>
        <maven.jar.plugin.version>3.2.2</maven.jar.plugin.version>
        <maven.javadoc.plugin.version>3.3.2</maven.javadoc.plugin.version>
        <maven.license.plugin.version>4.1</maven.license.plugin.version>
        <maven.moditect.plugin.version>1.0.0-SNAPSHOT</maven.moditect.plugin.version>
        <maven.release.plugin.version>3.0.0-M5</maven.release.plugin.version>
        <maven.shade.plugin.version>3.3.0</maven.shade.plugin.version>
        <maven.site.plugin.version>3.11.0</maven.site.plugin.version>
        <maven.source.plugin.version>3.2.1</maven.source.plugin.version>
        <maven.surefire.plugin.version>3.1.2</maven.surefire.plugin.version>
        <maven.dependency-check.plugin.version>8.2.1</maven.dependency-check.plugin.version>

        <!-- dependency versions -->
        <maven.resolver.version>2.0.0-alpha-11</maven.resolver.version>
        <glassfish.el.version>5.0.0-M1</glassfish.el.version>
        <hamcrest.version>2.2</hamcrest.version>
        <jakarta.el.version>5.0.1</jakarta.el.version>
        <jacoco.version>0.8.7</jacoco.version>
        <jsch.version>0.2.23</jsch.version>
        <junit.version>4.13.2</junit.version>
        <junit.five.version>5.8.1</junit.five.version>
        <maven.settings.version>3.9.6</maven.settings.version>
        <mockito.version>4.4.0</mockito.version>
        <p4.version>2019.1.1889202</p4.version>
    </properties>

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

    <repositories>
      <repository>
        <id>central</id>
        <url>https://repo1.maven.org/maven2/</url>
        <releases>
          <enabled>true</enabled>
        </releases>
        <snapshots>
          <enabled>false</enabled>
        </snapshots>
      </repository>
      <repository>
        <id>snapshots-repo</id>
        <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        <releases>
          <enabled>false</enabled>
        </releases>
        <snapshots>
          <enabled>true</enabled>
        </snapshots>
      </repository>
    </repositories>
    <pluginRepositories>
        <pluginRepository>
            <id>central</id>
            <url>https://repo1.maven.org/maven2/</url>
            <releases>
              <enabled>true</enabled>
            </releases>
            <snapshots>
              <enabled>false</enabled>
            </snapshots>
        </pluginRepository>
        <pluginRepository>
            <id>snapshots-repo</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
            <releases>
              <enabled>false</enabled>
            </releases>
            <snapshots>
              <enabled>true</enabled>
            </snapshots>
        </pluginRepository>
    </pluginRepositories>

    <dependencyManagement>
        <!-- enforce specific versions of dependencies -->
        <dependencies>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${junit.version}</version>
                <scope>provided</scope>
                <exclusions>
                    <exclusion>
                        <groupId>org.hamcrest</groupId>
                        <artifactId>hamcrest-core</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

            <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter-api</artifactId>
                <version>${junit.five.version}</version>
            </dependency>
            <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter-engine</artifactId>
                <version>${junit.five.version}</version>
            </dependency>

            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>${mockito.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.hamcrest</groupId>
                        <artifactId>hamcrest-core</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest-core</artifactId>
                <version>${hamcrest.version}</version>
            </dependency>

            <dependency>
                <groupId>jakarta.el</groupId>
                 <artifactId>jakarta.el-api</artifactId>
                <version>${jakarta.el.version}</version>
            </dependency>
            <dependency>
                <groupId>org.glassfish</groupId>
                <artifactId>jakarta.el</artifactId>
                <version>${glassfish.el.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>jakarta.el</groupId>
                        <artifactId>jakarta.el-api</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

            <dependency>
                <groupId>com.github.mwiede</groupId>
                <artifactId>jsch</artifactId>
                <version>${jsch.version}</version>
            </dependency>

            <dependency>
                <groupId>com.perforce</groupId>
                <artifactId>p4java</artifactId>
                <version>${p4.version}</version>
            </dependency>

            <dependency>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>${maven.license.plugin.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>${maven.source.plugin.version}</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${maven.javadoc.plugin.version}</version>
                <configuration>
                    <failOnError>false</failOnError>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven.compiler.plugin.version}</version>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                    <testSource>${java.version}</testSource>
                    <testTarget>${java.version}</testTarget>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>${maven.enforcer.plugin.version}</version>
                <executions>
                    <execution>
                        <id>enforce-plugin-versions</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireMavenVersion>
                                    <version>[${maven.version},)</version>
                                </requireMavenVersion>
                                <requireJavaVersion>
                                    <version>${java.version}</version>
                                </requireJavaVersion>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${maven.surefire.plugin.version}</version>
                <configuration>
                    <useModulePath>false</useModulePath>
                    <argLine>-Xms800m -Xmx800m</argLine>
                    <includes>
                        <include>**/*Test.java</include>
                    </includes>
                    <systemPropertyVariables>
                        <java.net.preferIPv4Stack>true</java.net.preferIPv4Stack>
                    </systemPropertyVariables>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>${maven.failsafe.plugin.version}</version>
                <configuration>
                    <useModulePath>false</useModulePath>
                    <argLine>-Xms800m -Xmx800m</argLine>
                    <includes>
                        <include>**/*IT.java</include>
                        <include>**/*Tests.java</include>
                    </includes>
                    <systemPropertyVariables>
                        <java.net.preferIPv4Stack>true</java.net.preferIPv4Stack>
                    </systemPropertyVariables>
                    <reuseForks>false</reuseForks>
                </configuration>
                <executions>
                    <execution>
                        <id>verify</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>integration-test</goal>
                            <goal>verify</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>flatten-maven-plugin</artifactId>
                <version>${maven.flatten.plugin.version}</version>
                <configuration>
                    <flattenMode>ossrh</flattenMode>
                </configuration>
                <executions>
                    <!-- enable flattening -->
                    <execution>
                        <id>flatten</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>flatten</goal>
                        </goals>
                    </execution>
                    <!-- ensure proper cleanup -->
                    <execution>
                        <id>flatten.clean</id>
                        <phase>clean</phase>
                        <goals>
                            <goal>clean</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>${maven.deploy.plugin.version}</version>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>${maven.release.plugin.version}</version>
                <configuration>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <goals>deploy</goals>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>${maven.gpg.plugin.version}</version>
                <configuration>
                    <skip>${skip-sign-artifacts}</skip>
                    <gpgArguments>
                        <arg>--pinentry-mode</arg>
                        <arg>loopback</arg>
                    </gpgArguments>
                </configuration>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-jar-plugin</artifactId>
              <version>${maven.jar.plugin.version}</version>
            </plugin>
        </plugins>

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>com.oracle.coherence.moditect</groupId>
                    <artifactId>moditect-maven-plugin</artifactId>
                    <version>1.0.0-RC1</version>
                    <executions>
                      <execution>
                        <id>add-module-info</id>
                        <phase>package</phase>
                        <goals>
                          <goal>add-module-info</goal>
                        </goals>
                        <configuration>
                          <module>
                            <moduleInfo>
                              <name>${module.name}</name>
                              <open>true</open>
                              <exports>
                                *;
                              </exports>
                              <addServiceUses>true</addServiceUses>
                            </moduleInfo>
                          </module>
                          <jdepsExtraArgs>
                            <extraArg>--multi-release=11</extraArg>
                          </jdepsExtraArgs>
                          <outputDirectory>${project.build.directory}</outputDirectory>
                          <overwriteExistingFiles>true</overwriteExistingFiles>
                        </configuration>
                      </execution>
                    </executions>
                </plugin>

                <!-- OWASP dependency CVE checker -->
                <plugin>
                    <groupId>org.owasp</groupId>
                    <artifactId>dependency-check-maven</artifactId>
                    <version>${maven.dependency-check.plugin.version}</version>
                    <configuration>
                        <skip>${dependency-check.skip}</skip>
                        <skipTestScope>true</skipTestScope>
                        <skipProvidedScope>true</skipProvidedScope>
                        <failBuildOnCVSS>0</failBuildOnCVSS>
                        <assemblyAnalyzerEnabled>false</assemblyAnalyzerEnabled>
                        <excludes>
                            <!-- Exclude stuff we do not deploy -->
                            <exclude>com.oracle.coherence:coherence-examples-rest</exclude>
                        </excludes>
                        <formats>
                            <format>HTML</format>
                            <format>CSV</format>
                        </formats>
                        <suppressionFiles>
                            <!--suppress UnresolvedMavenProperty -->
                            <suppressionFile>etc/dependency-check-suppression.xml</suppressionFile>
                        </suppressionFiles>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <profiles>
        <profile>
            <id>dependency-check</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.owasp</groupId>
                        <artifactId>dependency-check-maven</artifactId>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>aggregate</goal>
                                </goals>
                                <phase>validate</phase>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
