<?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>

    <!-- Needed to make deployment work -->
    <parent>
        <groupId>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>7</version>
    </parent>


    <!-- parent pom -->
    <groupId>org.into-cps</groupId>
    <artifactId>vdmcheck</artifactId>
    <version>1.1.3</version>

    <packaging>pom</packaging>
    <name>FMUCheck Tools</name>
    <description>iA suite of tools for checking FMUs</description>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.build.timestamp.format>yyMMdd</maven.build.timestamp.format>
        <vdmj.version>4.5.0</vdmj.version>

        <revision>1.1.3</revision>
        <changelist></changelist>
        <sha1/>
    </properties>

    <!-- add repository for dependencies to force Maven Central to use s01 -->
    <repositories>
        <repository>
            <name>Maven Central Snapshots</name>
            <id>ossrh</id>
            <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
        </repository>
    </repositories>

    <!-- sub modules -->
    <modules>
        <module>fmi2</module>
        <module>fmi3</module>
        <module>xsd2vdm</module>
        <module>fmuReader</module>

    </modules>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>dk.au.ece.vdmj</groupId>
                <artifactId>vdmj</artifactId>
                <version>${vdmj.version}</version>
            </dependency>
            <dependency>
                <groupId>dk.au.ece.vdmj</groupId>
                <artifactId>annotations</artifactId>
                <version>${vdmj.version}</version>
            </dependency>
            <dependency>
                <groupId>org.into-cps.vdmcheck</groupId>
                <artifactId>xsd2vdm</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.into-cps.vdmcheck</groupId>
                <artifactId>fmuReader</artifactId>
                <version>${project.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.8.1</version>
                    <configuration>
                        <source>1.8</source>
                        <target>1.8</target>
                    </configuration>
                </plugin>
                <plugin>
                    <artifactId>maven-clean-plugin</artifactId>
                    <version>3.1.0</version>
                </plugin>
                <plugin>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>3.1.0</version>
                </plugin>
                <plugin>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>2.6</version>
                    <!--should be upgraded to version 3.2.0-->
                </plugin>
                <plugin>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>3.3.0</version>
                </plugin>
                <plugin>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>3.0.0-M1</version>
                </plugin>
                <plugin>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>3.0.0-M1</version>
                </plugin>
                <plugin>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>3.9.0</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>3.0.0-M5</version>
                    <configuration>
                        <redirectTestOutputToFile>true</redirectTestOutputToFile>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>3.0.0-M1</version>
                    <configuration>
                        <tagNameFormat>Release/@{project.version}</tagNameFormat>
                    </configuration>
                </plugin>


                <!-- Attatch sources to all installed jars -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>3.2.1</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.3.2</version>
                    <executions>
                        <execution>
                            <id>attach-javadocs</id>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <failOnError>false</failOnError>
                        <quiet>true</quiet>
                    </configuration>
                </plugin>

            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>3.0.0-M3</version>
                <executions>
                    <execution>
                        <id>enforce-maven</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireMavenVersion>
                                    <version>3.2.5</version>
                                </requireMavenVersion>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.outbrain.swinfra</groupId>
                <artifactId>ci-friendly-flatten-maven-plugin</artifactId>
                <version>1.0.14</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>clean</goal>
                            <goal>flatten</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>


    <scm>
        <url>git@github.com:INTO-CPS-Association/FMI-VDM-Model</url>
        <connection>scm:git:git//github.com/INTO-CPS-Association/FMI-VDM-Model
        </connection>
        <developerConnection>
            scm:git:git@github.com:INTO-CPS-Association/FMI-VDM-Model
        </developerConnection>
        <tag>HEAD</tag>
    </scm>


    <licenses>
        <license>
            <name>INTO-CPS Association Public License</name>
            <url>
                https://gist.github.com/lausdahl/12499d97459e75f495bd0bb3e50670d6#file-into-cps-association-license-txt
            </url>
        </license>
    </licenses>

    <organization>
        <name>INTO CPS</name>
        <url>http://into-cps.org/</url>
    </organization>

    <inceptionYear>2020</inceptionYear>


    <profiles>
        <profile>
            <id>sonatype</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <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.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.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.12</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-gpg-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-enforcer-plugin</artifactId>
                        <version>3.0.0</version>
                        <executions>
                            <execution>
                                <id>enforce-no-snapshots</id>
                                <goals>
                                    <goal>enforce</goal>
                                </goals>
                                <configuration>
                                    <rules>
                                        <requireReleaseDeps>
                                            <message>No Snapshots Allowed!</message>
                                        </requireReleaseDeps>
                                    </rules>
                                    <fail>true</fail>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>au</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <distributionManagement>
                <repository>
                    <id>artifactory-into-cps-release</id>
                    <name>artifactory-into-cps-release</name>
                    <url>https://overture.au.dk/artifactory/into-cps</url>
                </repository>
                <snapshotRepository>
                    <id>artifactory-into-cps-snapshots</id>
                    <name>artifactory-into-cps-snapshots</name>
                    <url>https://overture.au.dk/artifactory/into-cps</url>
                </snapshotRepository>
            </distributionManagement>
        </profile>

        <profile>
            <id>combinedtest</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <modules>
                <module>combined</module>
            </modules>
        </profile>

    </profiles>

</project>
