<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>com.automatak.dnp3</groupId>
    <artifactId>opendnp3-parent</artifactId>
    <version>2.2.1-SNAPSHOT</version>
    <packaging>pom</packaging>

    <name>opendnp3</name>
    <url>http://www.github.com/automatak/dnp3</url>
    <description>JNI bindings for opendnp3. A companion shared library (so/dll) is required.</description>

    <modules>
        <module>bindings</module>
        <module>example</module>
        <module>codegen</module>
    </modules>

    <properties>
        <junit.version>4.9</junit.version>
        <license-maven-plugin.version>3.0</license-maven-plugin.version>
        <maven-javadoc-plugin.version>2.9</maven-javadoc-plugin.version>
        <maven-scala.plugin.version>3.1.3</maven-scala.plugin.version>
        <scala.version>2.11.8</scala.version>
        <maven-source-plugin.version>2.1.2</maven-source-plugin.version>
        <opendnp3.version>2.2.0-SNAPSHOT</opendnp3.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <surefire-plugin.version>2.12.4</surefire-plugin.version>
    </properties>

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

    <scm>
        <url>https://github.com/automatak/dnp3.git</url>
        <connection></connection>
    </scm>

    <developers>
        <developer>
            <id>jadamcrain</id>
            <name>J Adam Crain</name>
            <email>jadamcrain@automatak.com</email>
        </developer>
    </developers>

    <distributionManagement>
        <snapshotRepository>
            <id>sonatype-snapshots</id>
            <name>Sonatype Snapshots</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
    </distributionManagement>


    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.0</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                    <compilerArgument>
                        -Xlint:unchecked
                    </compilerArgument>
                    <compilerArgument>
                        -Werror
                    </compilerArgument>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>${license-maven-plugin.version}</version>
                <configuration>
                    <strictCheck>true</strictCheck>
                    <failIfMissing>true</failIfMissing>
                    <header>AUTOMATAK_FILE_HEADER</header>
                    <mapping>
                        <h>SLASHSTAR_STYLE</h>
                        <hpp>SLASHSTAR_STYLE</hpp>
                        <cpp>SLASHSTAR_STYLE</cpp>
                        <application>JAVADOC_STYLE</application>
                    </mapping>
		    <excludes>
                      <exclude>*/enums/*.java</exclude>
                    </excludes>
                    <includes>
			<!-- THIS IS BROKEN. The above exclude isn't working. Disable this for the moment -->
                        <!--<include>**/*.java</include>-->
                        <include>cpp/*.cpp</include>
                        <include>cpp/*.hpp</include>
                    </includes>                    
                </configuration>
                <executions>
                    <execution>
                        <id>check-headers</id>
                        <phase>process-sources</phase>
                        <goals>
                            <goal>format</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>${maven-source-plugin.version}</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${maven-javadoc-plugin.version}</version>
                <configuration>
                    <!-- Default configuration for all reports -->
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>aggregate</id>
                        <goals>
                            <goal>aggregate</goal>
                        </goals>
                        <phase>site</phase>
                        <configuration>
                            <!-- Specific configuration for the aggregate report -->
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>net.alchim31.maven</groupId>
                <artifactId>scala-maven-plugin</artifactId>
                <version>${maven-scala.plugin.version}</version>
                <executions>
                    <execution>
                        <id>compile</id>
                        <goals>
                            <goal>add-source</goal>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>testCompile</id>
                        <goals>
                            <goal>testCompile</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <args>
                        <arg>-feature</arg>
                        <arg>-language:implicitConversions</arg>
                        <arg>-deprecation</arg>
                        <arg>-target:jvm-1.8</arg>
                        <arg>-Ywarn-adapted-args</arg>
                    </args>
                    <jvmArgs>
                        <jvmArg>-Xmx1024m</jvmArg>
                    </jvmArgs>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${surefire-plugin.version}</version>
                <configuration>
                    <includes>
                        <include>**/*.class</include>
                    </includes>
                    <reportFormat>brief</reportFormat>
                    <useFile>false</useFile>
                </configuration>
            </plugin>
        </plugins>

    </build>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.scala-lang</groupId>
            <artifactId>scala-library</artifactId>
            <version>${scala.version}</version>
            <scope>compile</scope>
        </dependency>
    </dependencies>

</project>
