<?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>
    <artifactId>crcl4java</artifactId>
    <groupId>com.github.wshackle</groupId>
    <version>1.5</version>
    <packaging>pom</packaging>
    <modules>
        <module>crcl4java-base</module>
        <module>crcl4java-utils</module>
        <module>crcl4java-ui</module>
        <module>crcl4java-exi</module>
        <module>crcl4java-commons-math</module>
        <module>crcl4java-motoman</module>
    </modules>
    
    <url>
        https://github.com/usnistgov/crcl
    </url>
    <description>
        Tools and Libraries for Java Developers using "Canonical Robot Command Language" (CRCL)
        The language called "Canonical Robot Command Language" (CRCL) provides generic command and status definitions that implement the functionality of typical industrial robots without being specific either to the language of a plan that is being executed or to the language used by a robot controller that executes CRCL commands. 
    </description>
    <repositories>
        <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>
        <!-- <repository>
            <id>crcl-mvn-repo</id>
            <url>https://raw.github.com/usnistgov/crcl/mvn-repo/</url>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>always</updatePolicy>
            </snapshots>
        </repository> -->
    </repositories>
    <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/usnistgov/crcl.git</connection>
        <developerConnection>scm:git:https://github.com/usnistgov/crcl.git</developerConnection>
        <!-- <developerConnection>scm:git:git@github.com:usnistgov/crcl.git</developerConnection> -->
        <url>https://github.com/usnistgov/crcl4java</url>
        <tag>crcl4java-1.5</tag>
    </scm>
    

    <profiles>
        <profile>
            <id>jdk8_diags_verbose</id>
            <activation>
                <jdk>[1.8,)</jdk>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <version>3.3</version>
                        <configuration>
                            <compilerArgs>
                                <arg>-Xdiags:verbose</arg>
                                <arg>-Xlint:unchecked</arg>
                            </compilerArgs>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>codecoverage</id>
            <build>
                <plugins>                               
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-project-info-reports-plugin</artifactId>
                        <version>2.8</version>
                    </plugin>
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                        <version>0.7.5.201505241946</version>
                        <executions>
                            <!--
                                Prepares the property pointing to the JaCoCo runtime agent which
                                is passed as VM argument when Maven the Surefire plugin is executed.
                            -->
                            <execution>
                                <id>pre-unit-test</id>
                                <goals>
                                    <goal>prepare-agent</goal>
                                </goals>
                                <configuration>
                                    <!-- Sets the path to the file which contains the execution data. -->
                                    <destFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</destFile>
                                    <!--
                                        Sets the name of the property containing the settings
                                        for JaCoCo runtime agent.
                                    -->
                                    <propertyName>surefireArgLine</propertyName>
                                </configuration>
                            </execution>
                            <!--
                                Ensures that the code coverage report for unit tests is created after
                                unit tests have been run.
                            -->
                            <execution>
                                <id>post-unit-test</id>
                                <phase>test</phase>
                                <goals>
                                    <goal>report</goal>
                                </goals>
                                <configuration>
                                    <!-- Sets the path to the file which contains the execution data. -->
                                    <dataFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</dataFile>
                                    <!-- Sets the output directory for the code coverage report. -->
                                    <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
                                </configuration>
                            </execution>
                            <!-- The Executions required by unit tests are omitted. -->
                            <!--
                                Prepares the property pointing to the JaCoCo runtime agent which
                                is passed as VM argument when Maven the Failsafe plugin is executed.
                            -->
                            <execution>
                                <id>pre-integration-test</id>
                                <phase>pre-integration-test</phase>
                                <goals>
                                    <goal>prepare-agent</goal>
                                </goals>
                                <configuration>
                                    <!-- Sets the path to the file which contains the execution data. -->
                                    <destFile>${project.build.directory}/coverage-reports/jacoco-it.exec</destFile>
                                    <!--
                                        Sets the name of the property containing the settings
                                        for JaCoCo runtime agent.
                                    -->
                                    <propertyName>failsafeArgLine</propertyName>
                                </configuration>
                            </execution>
                            <!--
                                Ensures that the code coverage report for integration tests after
                                integration tests have been run.
                            -->
                            <execution>
                                <id>post-integration-test</id>
                                <phase>post-integration-test</phase>
                                <goals>
                                    <goal>report</goal>
                                </goals>
                                <configuration>
                                    <!-- Sets the path to the file which contains the execution data. -->
                                    <dataFile>${project.build.directory}/coverage-reports/jacoco-it.exec</dataFile>
                                    <!-- Sets the output directory for the code coverage report. -->
                                    <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <version>2.15</version>
                        <configuration>
                            <!-- Sets the VM argument line used when unit tests are run. -->
                            <argLine>${surefireArgLine}</argLine>
                            <!-- Skips unit tests if the value of skip.unit.tests property is true -->
                            <skipTests>${skip.unit.tests}</skipTests>
                            <!-- Excludes integration tests when unit tests are run. -->
                            <excludes>
                                <exclude>**/IT*.java</exclude>
                            </excludes>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-failsafe-plugin</artifactId>
                        <version>2.15</version>
                        <executions>
                            <execution>
                                <id>default-integration-test</id>
                                <goals>
                                    <goal>integration-test</goal>
                                </goals>
                                <configuration>
                                    <argLine>${failsafeArgLine}</argLine>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>skip_tests</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <version>2.18.1</version>
                        <configuration>
                            <skipTests>true</skipTests>
                            <skip>true</skip>
                        </configuration>
                    </plugin>
                    <plugin>
                        <artifactId>maven-failsafe-plugin</artifactId>
                        <version>2.18.1</version>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>integration-test</goal>
                                    <goal>verify</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <skip>true</skip>
                            <skipTests>true</skipTests>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile> 
            <id>all</id>
            <modules>
                <module>crcl4java-restful-proxy</module>
                <module>crcl4java-vaadin-webapp</module>
                <module>crcl4java-fanuc</module>
                <module>crcl4java-zeroc-ice</module>
            </modules>
        </profile>
        <profile> 
            <id>all_linux</id>
            <modules>
                <module>crcl4java-restful-proxy</module>
                <module>crcl4java-vaadin-webapp</module>
                <module>crcl4java-zeroc-ice</module>
            </modules>
        </profile>
        <profile> 
            <id>allexceptice</id>
            <modules>
                <module>crcl4java-restful-proxy</module>
                <module>crcl4java-vaadin-webapp</module>
                <module>crcl4java-fanuc</module>
            </modules>
        </profile>
        <profile> 
            <id>withweb</id>
            <modules>
                <module>crcl4java-restful-proxy</module>
                <module>crcl4java-vaadin-webapp</module>
            </modules>
        </profile>
        <profile> 
            <id>withice</id>
            <modules>
                <module>crcl4java-zeroc-ice</module>
            </modules>
        </profile>
        <profile>
            <id>release_github</id>
            <properties>
                <github.global.server>github</github.global.server>
            </properties>
            
            <distributionManagement>
                <repository>
                    <id>internal.repo</id>
                    <name>Temporary Staging Repository</name>
                    <url>file://${user.home}/crcl4java-mvn-repo</url>
                </repository>
            </distributionManagement>
            <build>
                <resources>
                    <resource>
                        <filtering>true</filtering>
                        <directory>${basedir}/src/main/githubscripts</directory>
                        <includes>
                            <include>*.bat</include>
                            <include>*.sh</include>
                        </includes>                  
                        <targetPath>${basedir}/githubscripts</targetPath>
                    </resource>
                </resources>
                <plugins>
                   
                    <plugin>
                        <artifactId>maven-deploy-plugin</artifactId>
                        <version>2.8.2</version>
                        <configuration>
                            <altDeploymentRepository>internal.repo::default::file://${project.build.directory}/mvn-repo</altDeploymentRepository>
                        </configuration>
                    </plugin>
                    
                    <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>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </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>
                    <plugin>
                        <groupId>com.github.github</groupId>
                        <artifactId>site-maven-plugin</artifactId>
                        <version>0.12</version>
                        <configuration>
                            <message>Maven artifacts for ${project.version}</message>  <!-- git commit message -->
                            <noJekyll>true</noJekyll>                                  <!-- disable webpage processing -->
                            <outputDirectory>${project.build.directory}/mvn-repo</outputDirectory> <!-- matches distribution management repository url above -->
                            <branch>refs/heads/mvn-repo</branch>                       <!-- remote branch name -->
                            <includes>
                                <include>**/*</include>
                            </includes>
                            <repositoryName>crcl</repositoryName>      <!-- github repo name -->
                            <repositoryOwner>usnistgov</repositoryOwner>    <!-- github username  -->
                            <merge>true</merge>
                        </configuration>
                        <executions>
                            <!-- run site-maven-plugin's 'site' target as part of the build's normal 'deploy' phase -->
                            <execution>
                                <goals>
                                    <goal>site</goal>
                                </goals>
                                <phase>deploy</phase>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile> 
            <id>release</id>
            <modules>
                <module>crcl4java-vaadin-webapp</module>
            </modules>
            <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>
                        <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>
                                C:\Program Files (x86)\GNU\GnuPG\gpg2.exe
                            </executable>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
    <name>crcl4java</name>
    <properties>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
    </properties>
</project>
