<?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.qbicc.rt</groupId>
    <artifactId>qbicc-rt-parent</artifactId>
    <!-- IMPORTANT: when updating this value, also update .github/workflows/maven.yml -->
    <version>17.alpha.0.2</version>

    <name>Qbicc Run Time: Parent POM</name>
    <description>Parent POM of Qbicc run time libraries</description>

    <url>http://qbicc.org</url>

    <properties>
        <sh>/bin/sh</sh>
        <make>/usr/bin/make</make>
        <!-- IMPORTANT: when updating this value, also update .github/workflows/maven.yml -->
        <version.qbicc>0.3.0</version.qbicc>

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

        <maven.compiler.target>17</maven.compiler.target>
        <maven.compiler.source>17</maven.compiler.source>
        <maven.compiler.testTarget>${maven.compiler.target}</maven.compiler.testTarget>
        <maven.compiler.testSource>${maven.compiler.source}</maven.compiler.testSource>
    </properties>

    <packaging>pom</packaging>

    <licenses>
        <license>
            <name>GNU General Public License, version 2, with the Classpath Exception</name>
            <url>http://openjdk.java.net/legal/gplv2+ce.html</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <scm>
        <url>https://github.com/qbicc/qbicc-class-library</url>
        <connection>scm:git:git://github.com/qbicc/qbicc-class-library</connection>
        <developerConnection>scm:git:git@github.com:qbicc/qbicc-class-library</developerConnection>
    </scm>

    <developers>
        <developer>
            <name>The Qbicc team</name>
            <email>david.lloyd@redhat.com</email>
            <organization>The Qbicc project team</organization>
            <organizationUrl>https://qbicc.org</organizationUrl>
        </developer>
    </developers>

    <issueManagement>
        <url>https://github.com/qbicc/qbicc-class-library/issues</url>
        <system>GitHub Issues</system>
    </issueManagement>

    <modules>
        <!-- tool modules -->
        <module>plugin</module>

        <!-- general setup & utils -->
        <module>annotation</module>

        <!-- actual JDK modules -->
        <module>java.base</module>
        <module>jdk.unsupported</module>

        <!-- aggregate module -->
        <module>aggregate</module>
    </modules>

    <dependencyManagement>
        <dependencies>
            <!-- internal -->

            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>qbicc-rt-java.base</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>qbicc-rt-jdk.unsupported</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>qbicc-rt-annotation</artifactId>
                <version>${project.version}</version>
            </dependency>

            <!-- qbicc -->

            <dependency>
                <groupId>org.qbicc</groupId>
                <artifactId>qbicc-runtime-linux</artifactId>
                <version>${version.qbicc}</version>
            </dependency>
            <dependency>
                <groupId>org.qbicc</groupId>
                <artifactId>qbicc-runtime-llvm</artifactId>
                <version>${version.qbicc}</version>
            </dependency>
            <dependency>
                <groupId>org.qbicc</groupId>
                <artifactId>qbicc-runtime-main</artifactId>
                <version>${version.qbicc}</version>
            </dependency>
            <dependency>
                <groupId>org.qbicc</groupId>
                <artifactId>qbicc-runtime-posix</artifactId>
                <version>${version.qbicc}</version>
            </dependency>

        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <artifactId>maven-antrun-plugin</artifactId>
                    <version>3.0.0</version>
                </plugin>
                <plugin>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.8.1</version>
                </plugin>
                <plugin>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>2.8.2</version>
                </plugin>
                <plugin>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>3.3.1</version>
                </plugin>
                <plugin>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>3.2.0</version>
                </plugin>
                <plugin>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>3.2.1</version>
                </plugin>
                <plugin>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.22.2</version>
                </plugin>
                <plugin>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>3.0.1</version>
                </plugin>
                <plugin>
                    <groupId>org.sonatype.plugins</groupId>
                    <artifactId>nexus-staging-maven-plugin</artifactId>
                    <version>1.6.8</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
            </plugin>
            <plugin>
                <artifactId>maven-source-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <profiles>
        <profile>
            <id>release</id>
            <activation>
                <property>
                    <name>release</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <executions>
                            <execution>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>3.0.1</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
                            <keepStagingRepositoryOnCloseRuleFailure>true</keepStagingRepositoryOnCloseRuleFailure>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
