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

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

    <packaging>pom</packaging>

    <groupId>org.into-cps</groupId>
    <artifactId>root</artifactId>

    <version>1.0.6</version>

    <name>The INTO CPS Tool Platform root</name>
    <description>

    </description>

    <modules>
        <module>nanohttpd</module>
        <module>orchestration</module>
        <module>modeldefinition</module>
    </modules>

    <prerequisites>
        <maven>3.0</maven>
    </prerequisites>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <fmu.api.version>1.0.4</fmu.api.version>
    </properties>

    <repositories>
        <repository>
            <id>overture.au.dk</id>
            <name>overture.au.dk-releases</name>
            <url>http://overture.au.dk/artifactory/into-cps</url>
        </repository>


    </repositories>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>


    </dependencies>

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

            <dependency>
                <groupId>org.into-cps.fmi</groupId>
                <artifactId>fmi2</artifactId>
                <version>${fmu.api.version}</version>
            </dependency>

            <dependency>
                <groupId>org.into-cps.fmi</groupId>
                <artifactId>jnifmuapi</artifactId>
                <version>${fmu.api.version}</version>
            </dependency>

            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>2.4</version>
            </dependency>

            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>3.3.2</version>
            </dependency>

        </dependencies>
    </dependencyManagement>

    <build>
        <defaultGoal>install</defaultGoal>

        <plugins>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>1.12</version>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.maven.doxia</groupId>
                        <artifactId>doxia-core</artifactId>
                        <version>1.4</version>
                    </dependency>
                </dependencies>
            </plugin>


            <plugin>
                <!--
            This plugin allows you to run

$ mvn versions:set -Dtycho.mode=maven -PWith-IDE -DnewVersion=2.0.4

and get all the version numbers updated nearly for free.
The tycho bit on the end just tells tycho (used in the
eclipse plugin build) to piss off.

Note that the versions in MANIFEST.MF files, etc, still
need to be set.

More details on the versions-maven-plugin are at
http://mojo.codehaus.org/versions-maven-plugin/
        -->
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>versions-maven-plugin</artifactId>
                <configuration>
                    <!-- Version control obviates the need for this. -->
                    <generateBackupPoms>false</generateBackupPoms>
                </configuration>
            </plugin>


            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>0.7.9</version>

                <configuration>
                    <destFile>
                        ${basedir}/target/coverage-reports/jacoco-unit.exec
                    </destFile>
                    <dataFile>
                        ${basedir}/target/coverage-reports/jacoco-unit.exec
                    </dataFile>
                    <excludes>
                        <exclude>org/overture/cgc/extast/analysis/**/*.*
                        </exclude>
                        <exclude>
                            org/overture/codegen/vdm2c/extast/expressions/**/*
                        </exclude>
                        <exclude>
                            org/overture/codegen/vdm2c/extast/declarations/**/*
                        </exclude>
                        <exclude>
                            org/overture/codegen/vdm2c/extast/statements/**/*
                        </exclude>
                        <exclude>org/overture/cgc/extast/node/**/*</exclude>
                        <exclude>org/overture/codegen/vdm2c/ast/preview/**/*
                        </exclude>

                    </excludes>
                </configuration>
                <executions>
                    <execution>
                        <id>jacoco-initialize</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>jacoco-site</id>
                        <phase>package</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>


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


        </plugins>

        <!-- Configuration of plugins for inheriting pom.xml files should
         be in the pluginManagement tag
    -->
        <pluginManagement>
            <plugins>


                <!-- Configure the compiler for all Overture Projects -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.5.1</version>
                    <configuration>
                        <source>1.8</source>
                        <target>1.8</target>
                    </configuration>
                </plugin>

                <!-- Attatch sources to all installed jars -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>3.0.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>2.10.3</version>
                    <executions>
                        <execution>
                            <id>attach-javadocs</id>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                            <configuration>
                                <additionalparam>${javadoc.opts}
                                </additionalparam>
                            </configuration>
                        </execution>
                    </executions>
                    <configuration>
                        <failOnError>false</failOnError>
                        <quiet>true</quiet>
                    </configuration>
                </plugin>

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

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.20.1</version>
                    <configuration>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>2.10</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>2.6</version>
                    <configuration>
                        <descriptorRefs>
                            <descriptorRef>jar-with-dependencies</descriptorRef>
                        </descriptorRefs>
                    </configuration>
                </plugin>


                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>3.4</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>2.5.2</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>2.8.2</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-shade-plugin</artifactId>
                    <version>2.4.3</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>2.6</version>
                </plugin>

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

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-antrun-plugin</artifactId>
                    <version>1.8</version>
                </plugin>

                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>build-helper-maven-plugin</artifactId>
                    <version>1.10</version>
                </plugin>

                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>versions-maven-plugin</artifactId>
                    <version>2.2</version>
                </plugin>

                <plugin>
                    <groupId>pl.project13.maven</groupId>
                    <artifactId>git-commit-id-plugin</artifactId>
                    <version>2.2.0</version>
                    <configuration>
                        <dotGitDirectory>${project.basedir}/.git
                        </dotGitDirectory>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>2.5.3</version>
                    <configuration>
                        <releaseProfiles>htlatex,release-sign-artifacts
                        </releaseProfiles>
                        <tagNameFormat>Release/@{project.version}
                        </tagNameFormat>
                    </configuration>
                </plugin>


                <!-- Disable the maven enforcer warning in Eclipse -->
                <plugin>
                    <groupId>org.eclipse.m2e</groupId>
                    <artifactId>lifecycle-mapping</artifactId>
                    <version>1.0.0</version>
                    <configuration>
                        <lifecycleMappingMetadata>
                            <pluginExecutions>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>org.apache.maven.plugins
                                        </groupId>
                                        <artifactId>maven-enforcer-plugin
                                        </artifactId>
                                        <versionRange>[1.0,)</versionRange>
                                        <goals>
                                            <goal>enforce</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <ignore />
                                    </action>
                                </pluginExecution>
                            </pluginExecutions>
                        </lifecycleMappingMetadata>
                    </configuration>
                </plugin>

                <!-- Plugin for license headers-->
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>license-maven-plugin</artifactId>
                    <version>1.8</version>
                    <configuration>
                        <verbose>true</verbose>
                        <addSvnKeyWords>false</addSvnKeyWords>
                        <processEndTag>#~%</processEndTag>
                        <processStartTag>#%~</processStartTag>
                        <addJavaLicenseAfterPackage>false
                        </addJavaLicenseAfterPackage>
                        <!--descriptionTemplate>${basedir}/src/license/myDescriptionTemplate.ftl</descriptionTemplate-->
                        <licenseName>gpl_v3</licenseName>
                        <roots>
                            <root>src/main/java</root>
                            <root>src/test/java</root>
                        </roots>

                        <includes>
                            <include>**/*.java</include>
                        </includes>
                        <excludes>
                            <exclude>*.ftl</exclude>

                        </excludes>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>1.6</version>
                </plugin>
            </plugins>
        </pluginManagement>

        <extensions>
            <extension>
                <groupId>org.apache.maven.wagon</groupId>
                <artifactId>wagon-ssh</artifactId>
                <version>2.4</version>
            </extension>
        </extensions>
    </build>

    <scm>
        <url>git@github.com:INTO-CPS-Association/maestro</url>
        <connection>scm:git:git//github.com/INTO-CPS-Association/maestro
        </connection>
        <developerConnection>
            scm:git:git@github.com:INTO-CPS-Association/maestro
        </developerConnection>
        <tag>Release/1.0.6</tag>
    </scm>

    <developers>

        <developer>
            <id>lausdahl</id>
            <email>lausdahl@eng.au.dk</email>
            <name>Kenneth Lausdahl</name>
            <roles>
                <role>architect</role>
                <role>developer</role>
            </roles>
            <organization>Aarhus University</organization>
            <organizationUrl>http://eng.au.dk/</organizationUrl>
        </developer>

    </developers>

    <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>2015</inceptionYear>

    <profiles>
        <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>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>java8-doclint-disabled</id>
            <activation>
                <jdk>[1.8,)</jdk>
            </activation>
            <properties>
                <javadoc.opts>-Xdoclint:none</javadoc.opts>
            </properties>
        </profile>

    </profiles>

</project>
