<?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>dk.au.ece.vdmj</groupId>
    <artifactId>vdmj-suite</artifactId>
    <name>VDMJ Suite</name>
    <packaging>pom</packaging>
    <version>4.7.0</version>

    <properties>
        <maven.build.timestamp.format>yyMMdd</maven.build.timestamp.format>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<minimumJava>11</minimumJava>

        <revision>4.7.0</revision>
        <changelist></changelist>
        <sha1/>
    </properties>

    <!-- sub modules -->
    <modules>
        <module>vdmj</module>
        <module>lsp</module>
        <module>annotations</module>
        <module>annotations2</module>
        <module>stdlib</module>
        <module>dbgp</module>
        <module>dbgpc</module>
        <module>cmd-plugins</module>
        <module>vdmjunit</module>
        <module>quickcheck</module>
        <module>packaging</module>
        <module>examples</module>
    </modules>

	<dependencyManagement>
	    <dependencies>
	        <dependency>
	         <groupId>junit</groupId>
	         <artifactId>junit</artifactId>
	         <version>4.13.1</version>
	         <scope>test</scope>
	     </dependency>
	     <dependency>
	         <groupId>dk.au.ece.vdmj</groupId>
	         <artifactId>vdmj</artifactId>
	         <version>${project.version}</version>
	     </dependency>
	     <dependency>
	         <groupId>dk.au.ece.vdmj</groupId>
	         <artifactId>lsp</artifactId>
	         <version>${project.version}</version>
	     </dependency>
	 </dependencies>
	</dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <!-- Configure the compiler for all VDMJ Projects -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.11.0</version>
                    <configuration>
                        <release>${minimumJava}</release>
                    </configuration>
                </plugin>

                <!-- Attatch sources to all installed jars -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>3.3.0</version>
                    <executions>
                        <execution>
                            <id>attach-sources</id>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <attach>true</attach>
                    </configuration>
                </plugin>

                <!-- Enable JavaDoc but dont fail on error. This must be disabled for
                     the Eclipse project in the IDE -->
                <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>
                    <configuration>
                        <failOnError>false</failOnError>
                        <detectOfflineLinks>false</detectOfflineLinks>
                        <quiet>true</quiet>
                        <doclint>none</doclint>
                        <source>${minimumJava}</source>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>3.3.1</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>3.0.0</version>
                    <configuration>
                        <includes>
                            <include>**/*Test.java</include>
                        </includes>
						<redirectTestOutputToFile>true</redirectTestOutputToFile>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>3.3.0</version>
                </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-install-plugin</artifactId>
                    <version>3.1.1</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>3.1.1</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-clean-plugin</artifactId>
                    <version>3.2.0</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jarsigner-plugin</artifactId>
                    <version>3.0.0</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>3.0.1</version>
                </plugin>

				<plugin>
					<groupId>com.outbrain.swinfra</groupId>
					<artifactId>ci-friendly-flatten-maven-plugin</artifactId>
					<version>1.0.17</version>
				</plugin>

            </plugins>
        </pluginManagement>

        <finalName>
            ${project.artifactId}-${project.version}-${maven.build.timestamp}
        </finalName>

		<!-- This plugin has to be outside the pluginManagement section -->
		<!-- otherwise, the .m2 installed POMs do not have the correct  -->
		<!-- substitution of the 4.7.0 etc. -->
		<plugins>
			<plugin>
				<groupId>com.outbrain.swinfra</groupId>
				<artifactId>ci-friendly-flatten-maven-plugin</artifactId>
				<executions>
					<execution>
						<?m2e ignore?><!-- avoids lifecyle error in some IDEs -->
						<goals>
							<goal>clean</goal>
							<goal>flatten</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>

    </build>    

    <scm>
        <url>https://github.com/nickbattle/vdmj
        </url>
        <connection>scm:git:https://github.com/nickbattle</connection>
        <developerConnection>scm:git:https://github.com/nickbattle</developerConnection>
    </scm>

	<distributionManagement>
		<repository>
			<id>github</id>
			<name>GitHub Packages</name>
			<url>https://maven.pkg.github.com/nickbattle/vdmj</url>
		</repository>
	</distributionManagement>

    <url>https://github.com/nickbattle/vdmj</url>

    <description>VDMJ provides basic tool support for the VDM-SL, VDM++ and VDM-RT specification languages, written in
        Java. It includes a parser, a type checker, an interpreter (with arbitrary precision arithmetic), a debugger, a
        proof obligation generator and a combinatorial test generator with coverage recording, as well as JUnit support
        for automatic testing and user definable annotations.
    </description>

    <developers>
        <developer>
            <id>NickBattle</id>
            <name>Nick Battle</name>
            <email>nick.battle@gmail.com</email>
            <roles>
                <role>developer</role>
            </roles>
        </developer>
    </developers>

    <licenses>
        <license>
            <name>GPL-3.0</name>
            <url>https://github.com/nickbattle/vdmj/blob/master/LICENCE</url>
        </license>
    </licenses>

    <profiles>
        <profile>
            <id>release</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <distributionManagement>
                <snapshotRepository>
                    <id>ossrh</id>
                    <url>https://central.sonatype.com/repository/maven-snapshots</url>
                </snapshotRepository>
                <repository>
                    <id>ossrh</id>
                    <url>https://central.sonatype.com</url>
                </repository>
            </distributionManagement>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.central</groupId>
                        <artifactId>central-publishing-maven-plugin</artifactId>
                        <version>0.10.0</version>
                        <extensions>true</extensions>
                        <configuration>
                            <publishingServerId>ossrh</publishingServerId>
                            <autoPublish>false</autoPublish>
                            <waitUntil>validated</waitUntil>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
