<?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>com.github.wshackle</groupId>
    <artifactId>aprs-framework</artifactId>
    <version>1.2</version>
    <packaging>jar</packaging>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <main.class>aprs.framework.LauncherAprsJFrame</main.class>
        <exec.mainClass>${main.class}</exec.mainClass>
        <optiplanner.version>7.6.0.Final</optiplanner.version>
        <crcl4java.version>1.7-1</crcl4java.version>
    </properties>
    <name>aprs-framework</name>
    <url>
        https://www.nist.gov/programs-projects/agility-performance-robotic-systems
    </url>
    <description>
        Framework for the Agility Performance of Robotic Systems(APRS) an experimental
        research project by the National Institute of Standards and Technology(NIST).
    </description>
    <licenses>
        <license>
            <name>Public Domain(US Government Work)</name>
            <url>http://www.copyright.gov/title17/92chap1.html#105</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    <developers>
        <developer>
            <id>wshackle</id>
            <name>Will Shackleford</name>
            <email>william.shackleford@nist.gov</email>
            <url>https://github.com/wshackle</url>
            <organization>NIST</organization>
            <organizationUrl>http://www.nist.gov</organizationUrl>
            <roles>
                <role>developer</role>
            </roles>
            <timezone>America/New_York</timezone>
        </developer>
    </developers>
    <scm>
        <connection>scm:git:https://github.com/wshackle/aprs-framework.git</connection>
        <developerConnection>scm:git:https://github.com/wshackle/aprs-framework.git</developerConnection>
        <!-- <developerConnection>scm:git:git@github.com:usnistgov/crcl.git</developerConnection> -->
        <url>https://github.com/wshackle/aprs-framework</url>
        <tag>aprs-framework-1.0</tag>
    </scm>
    
    
    <dependencies>
        <dependency>
            <groupId>org.eclipse.collections</groupId>
            <artifactId>eclipse-collections-api</artifactId>
            <version>9.0.0</version>
        </dependency>

        <dependency>
            <groupId>org.eclipse.collections</groupId>
            <artifactId>eclipse-collections</artifactId>
            <version>9.0.0</version>
        </dependency>
        <dependency>
            <groupId>javax.xml.bind</groupId>
            <artifactId>jaxb-api</artifactId>
            <version>2.3.0</version>
        </dependency>
        <!-- <dependency>
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>6.0.6</version>
        </dependency>
        -->
        <!-- <dependency>
            <groupId>org.neo4j</groupId>
            <artifactId>neo4j-jdbc-driver</artifactId>
            <version>3.0.1</version>
        </dependency> -->
        <dependency>
            <groupId>org.neo4j</groupId>
            <artifactId>neo4j-jdbc</artifactId>
            <version>2.3.2</version>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>crcl4java-base</artifactId>
            <version>${crcl4java.version}</version>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>crcl4java-utils</artifactId>
            <version>${crcl4java.version}</version>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>crcl4java-ui</artifactId>
            <version>${crcl4java.version}</version>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>crcl4java-vaadin-webapp</artifactId>
            <version>${crcl4java.version}</version>
            <classifier>classes</classifier>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>fanucCRCLServer</artifactId>
            <version>${crcl4java.version}</version>
        </dependency>
        <dependency>
            <groupId>com.jcraft</groupId>
            <artifactId>jsch</artifactId>
            <version>0.1.54</version>
        </dependency>
        <dependency>
            <groupId>com.bsb.common.vaadin</groupId>
            <artifactId>com.bsb.common.vaadin7.embed</artifactId>
            <version>0.6</version>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>crcl4java-motoman</artifactId>
            <version>${crcl4java.version}</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-core</artifactId>
            <version>1.3</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-csv</artifactId>
            <version>1.4</version>
        </dependency>
        <dependency>
            <groupId>org.optaplanner</groupId>
            <artifactId>optaplanner-core</artifactId>
            <version>${optiplanner.version}</version>
        </dependency>
        
        <!-- Annotations from the Checker Framework: nullness, interning, locking, ... -->
        <dependency>
            <groupId>org.checkerframework</groupId>
            <artifactId>checker-qual</artifactId>
            <!-- Use checker-qual7 if targeting Java 7 -->
            <!-- <artifactId>checker-qual7</artifactId> -->
            <version>2.5.0</version>
        </dependency>
                
        <!-- <dependency>
            <groupId>org.drools</groupId>
            <artifactId>drools-core</artifactId>
            <version>${optiplanner.version}</version>
        </dependency>
        <dependency>
            <groupId>org.optaplanner</groupId>
            <artifactId>optaplanner-benchmark</artifactId>
            <version>${optiplanner.version}</version>
        </dependency>
        <dependency>
            <groupId>org.drools</groupId>
            <artifactId>drools-compiler</artifactId>
            <version>${optiplanner.version}</version>
        </dependency>
        <dependency>
            <groupId>org.kie</groupId>
            <artifactId>kie-api</artifactId>
            <version>${optiplanner.version}</version>
        </dependency> -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.7.25</version>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>1.2.3</version>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-core</artifactId>
            <version>1.2.3</version>
        </dependency>
    </dependencies>
    <repositories>
        <repository>
            <id>neo4j-public</id>
            <url>http://m2.neo4j.org/content/groups/public</url>
            <releases>
                <enabled>true</enabled>
                <checksumPolicy>warn</checksumPolicy>
            </releases>
        </repository>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
            <releases>
                <enabled>true</enabled>
                <updatePolicy>never</updatePolicy>
            </releases>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>daily</updatePolicy>
            </snapshots>
        </repository>
    </repositories>
    <build>
        
        <!-- SKIP SETTING UP FILTERING LIKE THIS IF YOU USE THE GENERATE FILE MODE :-) -->
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
                <includes>
                    <include>**/*.properties</include>
                    <include>**/*.xml</include>
                    <include>**/*.txt</include>
                    <include>**/*.jpeg</include>
                    <include>**/*.png</include>
                </includes>
            </resource>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>false</filtering>
                <includes>
                    <include>**/*.scss</include>
                    <include>**/*.jpg</include>
                    <include>**/*.png</include>
                    <include>**/*.ico</include>
                </includes>
            </resource>
        </resources>
        
        <plugins>        
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <showDeprecation>true</showDeprecation>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <profiles>
        <profile>
            <!-- mvn -Dprofile.release  to activate this and the release,jar-with_depends profile. -->
            <activation>
                <property>
                    <name>profile.release</name>
                </property>
            </activation>
            <id>jar-with-depends</id>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-assembly-plugin</artifactId>
                        <version>3.1.0</version>
                        <configuration>
                            <archive>
                                <manifest>
                                    <mainClass>${main.class}</mainClass>
                                </manifest>
                            </archive>
                            <descriptorRefs>
                                <descriptorRef>jar-with-dependencies</descriptorRef>
                            </descriptorRefs>
                        </configuration>
                        <executions>
                            <execution>
                                <id>make-assembly</id> <!-- this is used for inheritance merges -->
                                <phase>package</phase> <!-- bind to the packaging phase -->
                                <goals>
                                    <goal>single</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile> 
            <!-- mvn -Dprofile.release  to activate this and the release,jar-with_depends profile. -->
            <activation>
                <property>
                    <name>profile.release</name>
                </property>
            </activation>
            <id>release</id>
            <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-release-plugin</artifactId>
                        <version>2.5.3</version>
                        <configuration>
                            <pushChanges>false</pushChanges>
                            <autoVersionSubmodules>true</autoVersionSubmodules>
                            <useReleaseProfile>false</useReleaseProfile>
                            <releaseProfiles>release</releaseProfiles>
                            <goals>deploy</goals>
                            <localCheckout>true</localCheckout>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-project-info-reports-plugin</artifactId>
                        <version>2.9</version>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>3.0.0</version>
                        <configuration>
                            <additionalparam>-Xdoclint:all</additionalparam>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.7</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-source-plugin</artifactId>
                        <version>3.0.0</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <inherited>true</inherited>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>windows_with_gpg4win</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <executable>
                                gpg2.exe
                            </executable>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>buildnumber</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>buildnumber-maven-plugin</artifactId>
                        <version>1.4</version>
                        <executions>
                            <execution>
                                <phase>generate-resources</phase>
                                <goals>
                                    <goal>create-metadata</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <attach>true</attach>
                            <!--make it available for jar/war classpath resource -->
                            <addOutputDirectoryToResources>true</addOutputDirectoryToResources>
                            <doCheck>false</doCheck>
                            <doUpdate>false</doUpdate>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>jgit_buildnumber</id>
            <build>
                <plugins>
                    <!-- enable JGit plugin -->
                    <plugin>
                        <groupId>ru.concerteza.buildnumber</groupId>
                        <artifactId>maven-jgit-buildnumber-plugin</artifactId>
                        <version>1.2.9</version>
                        <executions>
                            <execution>
                                <id>git-buildnumber</id>
                                <goals>
                                    <goal>extract-buildnumber</goal>
                                </goals>
                                <phase>validate</phase>
                            </execution>
                        </executions>
                    </plugin> 
            
                    <!-- specify manifest fields -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-jar-plugin</artifactId>
                        <version>3.0.2</version>
                        <configuration>
                            <archive>
                                <manifestEntries>
                                    <Specification-Title>${project.name}</Specification-Title>
                                    <Specification-Version>${project.version}</Specification-Version>
                                    <Specification-Vendor>${project.specification_vendor}</Specification-Vendor>
                                    <Implementation-Title>${project.groupId}.${project.artifactId}</Implementation-Title>
                                    <Implementation-Version>${git.revision}</Implementation-Version>
                                    <Implementation-Vendor>${project.implementation_vendor}</Implementation-Vendor>
                                    <X-Git-Branch>${git.branch}</X-Git-Branch>
                                    <X-Git-Tag>${git.tag}</X-Git-Tag>
                                    <X-Git-Commits-Count>${git.commitsCount}</X-Git-Commits-Count>
                                </manifestEntries>
                            </archive>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>owasp_dep_check</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.owasp</groupId>
                        <artifactId>dependency-check-maven</artifactId>
                        <version>3.0.2</version>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>native_installer</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>exec-maven-plugin</artifactId>
                        <version>1.6.0</version>
                        <executions>
                    
                            <execution>
                                <id>deploy_native</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>exec</goal>
                                </goals>
                                <configuration>
                                    <executable>
                                        ${java.home}/../bin/javapackager
                                    </executable>
 
                                    <arguments>
                                        <argument>-deploy</argument>
                                        <argument>-native</argument>
                                        <argument>installer</argument>
                                        <argument>-appclass</argument>
                                        <argument>${main.class}</argument>
                                        <argument>-srcfiles</argument>
                                        <argument>
                                            ${project.build.directory}/${project.build.finalName}-jar-with-dependencies.jar
                                        </argument>
                                        <argument>-outdir</argument>
                                        <argument>./target</argument>
                                        <argument>-name</argument>
                                        <argument>${project.artifactId}</argument>
                                        <argument>-outfile</argument>
                                        <argument>
                                            ${project.build.finalName}
                                        </argument>
                                        <argument>-v</argument>
                                    </arguments>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>with_checkers</id>
            <properties>
                <!-- These properties will be set by the Maven Dependency plugin -->
                <annotatedJdk>${org.checkerframework:jdk8:jar}</annotatedJdk>
                <!-- Uncomment to use the Type Annotations compiler. -->
                <!-- <typeAnnotationsJavac>${org.checkerframework:compiler:jar}</typeAnnotationsJavac> -->
            </properties>
            <dependencies>
                <dependency>
                    <groupId>org.checkerframework</groupId>
                    <artifactId>checker</artifactId>
                    <version>2.5.0</version>
                </dependency>
                
                
                <!-- The Type Annotations compiler. Uncomment if using annotations in comments. -->
                <!-- <dependency>
                  <groupId>org.checkerframework</groupId>
                  <artifactId>compiler</artifactId>
                  <version>2.3.2</version>
                </dependency> -->
                <dependency>
                    <groupId>org.checkerframework</groupId>
                    <artifactId>jdk8</artifactId>
                    <version>2.5.0</version>
                </dependency>
            </dependencies>
            <build>
                <plugins>
                    <plugin>
                        <!-- For checker framework , http://types.cs.washington.edu/checker-framework/current/checker-framework-manual.html#maven -->
                        <!-- This plugin will set properties values using dependency information -->
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-dependency-plugin</artifactId>
                        <version>3.1.0</version>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>properties</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
            
            
                    <plugin>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <version>3.7.0</version>
                        <configuration>
                            <!-- Change source and target to 1.7 to create .class files that can be run on a Java 7 JVM -->
                            <source>1.8</source>
                            <target>1.8</target>
                            <!-- Uncomment the following line to use the type annotations compiler. -->
                            <!-- <fork>true</fork> -->
                            <compilerArguments>
                                <Xmaxerrs>10000</Xmaxerrs>
                                <Xmaxwarns>10000</Xmaxwarns>
                            </compilerArguments>
                            <annotationProcessors>
                                <!-- Add all the checkers you want to enable here -->
                                <annotationProcessor>org.checkerframework.checker.nullness.NullnessChecker</annotationProcessor>
                            </annotationProcessors>
                            <compilerArgs>
                                <arg>-Xlint:all,-serial</arg>
                                <arg>-AprintErrorStack</arg>
                                <!-- location of the annotated JDK, which comes from a Maven dependency -->
                                <arg>-Xbootclasspath/p:${annotatedJdk}</arg>
                                <!-- Uncomment the following line to use the type annotations compiler. -->
                                <!-- <arg>-J-Xbootclasspath/p:${typeAnnotationsJavac}</arg> -->
                                <!-- Uncomment the following line to turn type-checking warnings into errors. -->
                                <!--<arg>-Awarns</arg>
                                <arg>-AstubDebug</arg>
                                <arg>-AstubWarnIfNotFound</arg> -->
                                <arg>-Astubs=${basedir}/checkerframework_stubs/</arg>
                                <arg>-AassumeAssertionsAreEnabled</arg>
                                <!-- <arg>-AprintAllQualifiers</arg>
                                <arg>-AprintVerboseGenerics</arg>
                                <arg>-Adetailedmsgtext</arg> -->
                            </compilerArgs>
                            <!-- 
                                Compiles are much slower when using the checkers.
                                Counter intuitively setting useIncrementalCompilation to false makes compiles a little faster.
                                If https://issues.apache.org/jira/browse/MCOMPILER-209 is ever fixed the useIncrementalCompilation may need to be reversed. 
                            -->
                            <useIncrementalCompilation>false</useIncrementalCompilation>
                        </configuration>
                    </plugin>
                    
                </plugins>
            </build>
        </profile>
        <profile>
            <id>jdpa_listen_not_true</id>
            <activation>
                <property>
                    <name>jpda.listen</name>
                    <value>!true</value>
                </property>
            </activation>
            <properties>
                <custom.nb.exec.args>-ea -agentlib:jdwp=transport=dt_socket,server=y,address=8000,suspend=n ${exec.args}</custom.nb.exec.args>
            </properties>
        </profile>
        
        <profile>
            <id>jdpa_listen_true</id>
            <activation>
                <property>
                    <name>jpda.listen</name>
                    <value>true</value>
                </property>
            </activation>
            <properties>
                <custom.nb.exec.args>
                    ${exec.args}
                </custom.nb.exec.args>
            </properties>
        </profile>
        <profile>
            <id>custom_nb_exec</id>
            <activation>
                <property>
                    <name>env.NB_EXEC_MAVEN_PROCESS_UUID</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>exec-maven-plugin</artifactId>
                        <version>1.2.1</version>
                        <executions>
                            <execution>
                                <id>default-cli</id>
                                <goals>
                                    <goal>exec</goal>
                                </goals>
                                <configuration>
                                    <executable>${exec.executable}</executable>
                                    <commandlineArgs>
                                        ${custom.nb.exec.args}
                                    </commandlineArgs>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>