<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>systems.manifold</groupId>
  <artifactId>manifold-parent</artifactId>
  <packaging>pom</packaging>
  <version>2024.1.29</version>

  <name>Manifold :: Parent</name>
  <description>
    Manifold is a Java compiler plugin, its features include Metaprogramming, Properties, Extension
    Methods, Operator Overloading, Templates, a Preprocessor, and more.
  </description>
  <url>http://manifold.systems/</url>

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

  <developers>
    <developer>
      <name>Manifold Systems, LLC</name>
      <email>admin@manifold.systems</email>
      <organization>Manifold</organization>
      <organizationUrl>http://manifold.systems/</organizationUrl>
    </developer>
  </developers>

  <modules>
    <module>manifold-core-parent</module>
    <module>manifold-deps-parent</module>
    <module>manifold-util</module>
    <module>manifold-javadoc-agent</module>
    <module>manifold-all</module>
  </modules>

  <properties>
    <java-source-ver>8</java-source-ver>
    <java-target-ver>8</java-target-ver>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <scm.root>scm:git:git@github.com:manifold-systems</scm.root>
  </properties>
  
  <scm>
    <connection>${scm.root}/manifold.git</connection>
    <developerConnection>${scm.root}/manifold.git</developerConnection>
    <url>https://github.com/manifold-systems/manifold</url>
    <tag>v2024.1.29</tag>
  </scm>
  
  <!--<repositories>-->
    <!--<repository>-->
      <!--<id>snapshots</id>-->
      <!--<name>libs-snapshot</name>-->
      <!--<url>https://oss.jfrog.org/artifactory/libs-snapshot</url>      -->
      <!--<releases>-->
        <!--<enabled>false</enabled>-->
      <!--</releases>-->
      <!--<snapshots>-->
        <!--<enabled>true</enabled>-->
      <!--</snapshots>-->
    <!--</repository>-->
  <!--</repositories>-->

  <!--<distributionManagement>-->
    <!--<snapshotRepository>-->
      <!--<id>manifold-snapshots</id>-->
      <!--<url>https://oss.jfrog.org/artifactory/oss-snapshot-local</url>-->
    <!--</snapshotRepository>-->
    <!--<repository>-->
      <!--<id>bintray-manifold-systems-manifold</id>-->
      <!--<name>manifold-systems-manifold</name>-->
      <!--<url>https://api.bintray.com/maven/manifold-systems/manifold/manifold/;publish=1</url>-->
    <!--</repository>-->
  <!--</distributionManagement>-->


  <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>
  
  <build>
    <plugins>

      <plugin>
        <groupId>org.sonatype.plugins</groupId>
        <artifactId>nexus-staging-maven-plugin</artifactId>
        <version>1.6.8</version>
        <extensions>true</extensions>
        <configuration>
          <serverId>ossrh</serverId>
          <nexusUrl>https://oss.sonatype.org/</nexusUrl>
          <autoReleaseAfterClose>true</autoReleaseAfterClose>
        </configuration>
      </plugin>
      
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.5.3</version>
        <configuration>
          <autoVersionSubmodules>true</autoVersionSubmodules>
          <releaseProfiles>release</releaseProfiles>
          <tagNameFormat>v@{project.version}</tagNameFormat>
          <localCheckout>true</localCheckout>
          <pushChanges>false</pushChanges>
          <mavenExecutorId>forked-path</mavenExecutorId>
          <arguments>-Dgpg.passphrase=${env.MAN_PASS_PHRASE}</arguments>
        </configuration>
        <dependencies>
          <dependency>
            <groupId>org.apache.maven.scm</groupId>
            <artifactId>maven-scm-provider-gitexe</artifactId>
            <version>1.9.4</version>
          </dependency>
        </dependencies>
      </plugin>
      <!-- Disabled because the error message is confusing and because Java 8 is likely the dominant platform for now -->
      <!--<plugin>-->
        <!--<groupId>org.apache.maven.plugins</groupId>-->
        <!--<artifactId>maven-enforcer-plugin</artifactId>-->
        <!--<version>3.0.0-M1</version>-->
        <!--<executions>-->
          <!--<execution>-->
            <!--<id>enforce-versions</id>-->
            <!--<goals>-->
              <!--<goal>enforce</goal>-->
            <!--</goals>-->
            <!--<configuration>-->
              <!--<rules>-->
                <!--<requireMavenVersion>-->
                  <!--<version>[3.2.2,)</version> &lt;!&ndash; https://stackoverflow.com/a/4629269/4750893 &ndash;&gt;-->
                <!--</requireMavenVersion>-->
              <!--</rules>-->
            <!--</configuration>-->
          <!--</execution>-->
        <!--</executions>-->
      <!--</plugin>-->
    </plugins>

    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.7.0</version>
          <configuration>
            <source>${java-source-ver}</source>
            <target>${java-target-ver}</target>
            <encoding>${project.build.sourceEncoding}</encoding>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>2.8.2</version>
          <configuration>
            <deployAtEnd>true</deployAtEnd>
          </configuration>
          <executions>
            <execution>
              <id>default-deploy</id>
              <phase>deploy</phase>
              <goals>
                <goal>deploy</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.20</version>
          <configuration>
            <!--<argLine>&#45;&#45;illegal-access=permit &#45;&#45;add-opens=java.base/jdk.internal.loader=ALL-UNNAMED</argLine>-->
            <useManifestOnlyJar>false</useManifestOnlyJar>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>2.3.2</version>
          <configuration>
            <archive>
              <manifest>
                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
              </manifest>
            </archive>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <configuration>
            <autoVersionSubmodules>true</autoVersionSubmodules>
            <releaseProfiles>release</releaseProfiles>
            <tagNameFormat>v@{project.version}</tagNameFormat>
            <updateBranchVersions>false</updateBranchVersions>
            <updateWorkingCopyVersions>false</updateWorkingCopyVersions>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-shade-plugin</artifactId>
          <version>3.1.0</version>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.13.1</version>
        <scope>test</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <profiles>
    
    <!-- GPG Signature on release -->
    <profile>
      <id>release-sign-artifacts</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.6</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    
    <profile>
      <id>internal.tools-jar</id>
      <activation>
        <jdk>1.8</jdk>
        <file>
          <missing>src/main/java/systems/manifold/Dummy.java</missing>
        </file>
      </activation>
      <dependencies>
        <dependency>
          <groupId>com.sun</groupId>
          <artifactId>tools</artifactId>
          <version>1.8.0</version>
          <scope>system</scope>
          <systemPath>${java.home}/../lib/tools.jar</systemPath>
        </dependency>
      </dependencies>
    </profile>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>2.2.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-dependency-plugin</artifactId>
            <version>2.8</version>
            <executions>
              <execution>
                <id>getClasspathFilenames</id>
                <goals>
                  <goal>properties</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>
