<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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>io.github.jaydoane</groupId>
    <artifactId>jctools-parent</artifactId>
    <packaging>pom</packaging>
    <version>4.0.5-jaydoane1</version>
    <name>JCTools Parent</name>
    <description>
      Fork of Cloudant's mirror of https://github.com/JCTools/JCTools to test publishing on Maven Central
    </description>
    <url>https://github.com/jaydoane/JCTools</url>
    <organization>
        <url>https://github.com/JCTools</url>
    </organization>
    <inceptionYear>2013</inceptionYear>

    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/jaydoane/JCTools/issues</url>
    </issueManagement>

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

    <scm>
        <url>https://github.com/jaydoane/JCTools</url>
        <connection>scm:git:https://github.com/jaydoane/JCTools</connection>
      <tag>jctools-parent-4.0.5-jaydoane1</tag>
  </scm>

    <developers>
        <developer>
            <url>https://github.com/nitsanw</url>
        </developer>
        <developer>
            <url>https://github.com/mjpt777</url>
        </developer>
        <developer>
            <url>https://github.com/RichardWarburton</url>
        </developer>
        <developer>
            <url>https://github.com/kay</url>
        </developer>
        <developer>
            <url>https://github.com/franz1981</url>
        </developer>
    </developers>

    <prerequisites>
        <maven>3.5.0</maven>
    </prerequisites>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <java.version>1.6</java.version>
        <java.test.version>1.8</java.test.version>

        <maven.compiler.source>${java.version}</maven.compiler.source>
        <maven.compiler.target>${java.version}</maven.compiler.target>
        <maven.compiler.testSource>${java.test.version}</maven.compiler.testSource>
        <maven.compiler.testTarget>${java.test.version}</maven.compiler.testTarget>

        <bnd.version>6.3.1</bnd.version>
        <bundle-plugin.version>5.1.8</bundle-plugin.version>
        <osgi.version>8.0.0</osgi.version>

        <hamcrest.version>1.3</hamcrest.version>
        <junit.version>4.13.2</junit.version>
        <guava-testlib.version>31.1-jre</guava-testlib.version>
        <lincheck.version>2.14.1</lincheck.version>
    </properties>

    <modules>
        <module>jctools-core</module>
        <module>jctools-build</module>
    </modules>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.osgi</groupId>
                <artifactId>osgi.annotation</artifactId>
                <version>${osgi.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <distributionManagement>
      <snapshotRepository>
        <id>central</id>
        <url>https://central.sonatype.com/repository/maven-snapshots/</url>
      </snapshotRepository>
      <repository>
        <id>central</id>
        <url>https://repo1.maven.org/maven2/repository/</url>
      </repository>
    </distributionManagement>

    <build>
        <pluginManagement>
        <!-- Define versions for children -->
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-clean-plugin</artifactId>
                <version>3.2.0</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>3.0.0-M2</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-install-plugin</artifactId>
                <version>3.0.0-M1</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.2.2</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.4.0</version>
            </plugin>
            <plugin>
              <!-- Fixing version & activating "release" profile for
                   those who use release plugin -->
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-release-plugin</artifactId>
              <version>3.1.1</version>
              <configuration>
                <autoVersionSubmodules>true</autoVersionSubmodules>
                <!-- Forward compatibility: "release-profile" will be
                     removed from super POM.  It's better to define
                     javadocs, sources, signing, etc. in an
                     independent "release" profile. -->
                <useReleaseProfile>false</useReleaseProfile>
                <releaseProfiles>release</releaseProfiles>
              </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>3.2.0</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.3.0</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <version>4.0.0-M1</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.2.1</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>3.0.0-M7</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.10.1</version>
                <configuration>
                    <source>${maven.compiler.source}</source>
                    <target>${maven.compiler.target}</target>
                    <testSource>${maven.compiler.testSource}</testSource>
                    <testTarget>${maven.compiler.testTarget}</testTarget>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>3.0.0</version>
                <executions>
                    <execution>
                        <id>enforce-java</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireJavaVersion>
                                    <version>${java.test.version}</version>
                                </requireJavaVersion>
                                <requireMavenVersion>
                                    <version>3.5.0</version>
                                </requireMavenVersion>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <version>${bundle-plugin.version}</version>
                <dependencies>
                    <!-- Same version as `biz.aQute.bnd.annotation` -->
                    <dependency>
                        <groupId>biz.aQute.bnd</groupId>
                        <artifactId>biz.aQute.bndlib</artifactId>
                        <version>${bnd.version}</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <instructions>
                        <!-- Adds a module descriptor named as the OSGI bundle -->
                        <_jpms-module-info>$[maven-symbolicname];access=0</_jpms-module-info>
                        <!-- Exports only explicitly annotated packages -->
                        <_exportcontents>$[packages;ANNOTATED;org.osgi.annotation.bundle.Export]</_exportcontents>
                    </instructions>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <version>3.0.0</version>
            </plugin>
            <plugin>
                <groupId>org.eluder.coveralls</groupId>
                <artifactId>coveralls-maven-plugin</artifactId>
                <version>4.3.0</version>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>0.8.7</version>
            </plugin>
        </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
    <profiles>

      <profile>
        <id>release</id>
        <build>
          <plugins>
            <plugin>
              <groupId>org.sonatype.central</groupId>
              <artifactId>central-publishing-maven-plugin</artifactId>
              <version>0.6.0</version>
              <extensions>true</extensions>
              <configuration>
                <publishingServerId>central</publishingServerId>
                <autoPublish>true</autoPublish>
              </configuration>
            </plugin>

            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-source-plugin</artifactId>
              <version>3.3.1</version>
              <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>
              <version>3.10.1</version>
              <executions>
                <execution>
                  <id>attach-javadocs</id>
                  <goals>
                    <goal>jar</goal>
                  </goals>
                  <configuration>
                    <doclint>none</doclint>
                  </configuration>
                </execution>
              </executions>
            </plugin>

            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-gpg-plugin</artifactId>
              <version>3.2.4</version>
              <executions>
                <execution>
                  <id>sign-artifacts</id>
                  <phase>verify</phase>
                  <goals>
                    <goal>sign</goal>
                  </goals>
                </execution>
              </executions>
            </plugin>
          </plugins>
        </build>
      </profile>

        <profile>
            <id>surefire-java8</id>
            <activation>
                <jdk>1.8</jdk>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <argLine />
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>surefire-java9-and-over</id>
            <activation>
                <jdk>[9,)</jdk>
            </activation>
            <properties>
                <!-- Releases are still done from a JDK8, but this makes life easier-->
                <java.version>1.8</java.version>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <argLine>
                                --add-opens java.base/jdk.internal.misc=ALL-UNNAMED
                                --add-exports java.base/jdk.internal.util=ALL-UNNAMED
                            </argLine>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <!-- For use by eclipse users using the m2 plugin that gets the source
                and target versions mixed up. With this you can go to right click on the projects,
                select "Maven" and "Select Profiles" then check "eclipse-dev". -->
            <id>eclipse-dev</id>
            <properties>
                <java.version>${java.test.version}</java.version>
            </properties>
        </profile>
    </profiles>
</project>
