<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"> 
 
    <parent>
        <groupId>org.lsst</groupId>
        <artifactId>org-lsst-ccs-parent</artifactId>
        <version>3.2.5</version>
        <relativePath />
    </parent>

    <modelVersion>4.0.0</modelVersion>
    <artifactId>org-lsst-ccs-base</artifactId>
    <packaging>pom</packaging>
    <version>6.2.14</version>
    <name>LSST CCS - Base (Pom)</name>
    
    <repositories>
        <repository>
            <id>lsst-maven2-public</id>
            <name>LSST Maven 2 central repository</name>
            <url>https://repo-nexus.lsst.org/nexus/content/groups/ccs-maven2-public/</url>
        </repository>
    </repositories>

    <properties>
        <org.lsst.ccs.site.dir>site-root/toolkit/org-lsst-ccs-toolkit/${project.version}/</org.lsst.ccs.site.dir>        
    </properties>


    <pluginRepositories>
        <pluginRepository>
            <id>freehep-maven</id>
            <name>Maven FreeHEP</name>
            <url>https://srs.slac.stanford.edu/nexus/content/groups/freehep-maven2-public/</url>
        </pluginRepository>
    </pluginRepositories>

    <dependencies>
        <dependency>
            <groupId>org.apache.activemq</groupId>
            <artifactId>activemq-core</artifactId>
            <version>${apache.activemq.version}</version>
            <scope>test</scope>
            <type>jar</type>
        </dependency>
        <dependency>
            <groupId>org.lsst</groupId>
            <artifactId>org-lsst-ccs-commons</artifactId>
        </dependency>
        <dependency>
            <groupId>org.lsst</groupId>
            <artifactId>org-lsst-ccs-commons</artifactId>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.lsst</groupId>
            <artifactId>org-lsst-ccs-bootstrap</artifactId>
        </dependency>
    </dependencies>

    <dependencyManagement>
        <dependencies>
            <!-- Lower level CCS dependencies -->
            <dependency>
                <groupId>org.lsst</groupId>
                <artifactId>org-lsst-ccs-utilities-taitime</artifactId>
                <version>1.0.11</version>
            </dependency>
            <dependency>
                <groupId>org.lsst</groupId>
                <artifactId>org-lsst-ccs-utilities</artifactId>
                <version>2.1.37</version>
            </dependency>
            <dependency>
                <groupId>org.lsst</groupId>
                <artifactId>org-lsst-ccs-command</artifactId>
                <version>3.0.25</version>
            </dependency>
            <dependency>
                <groupId>org.lsst</groupId>
                <artifactId>org-lsst-ccs-bootstrap</artifactId>
                <type>test-jar</type>
                <version>3.1.2</version>
            </dependency>
            <dependency>
                <groupId>org.lsst</groupId>
                <artifactId>org-lsst-ccs-bootstrap</artifactId>
                <version>3.1.2</version>
            </dependency>
            <dependency>
                <groupId>commons-beanutils</groupId>
                <artifactId>commons-beanutils</artifactId>
                <version>1.9.3</version>
            </dependency>           
            <dependency>
                <groupId>mysql</groupId>
                <artifactId>mysql-connector-java</artifactId>
                <version>5.1.23</version>
            </dependency>
            <!-- Toolkit dependencies -->
            <!-- DO NOT CHANGE THE VERSIONS FROM HERE:  (THEY ARE CHANGED BY THE RELEASE PROCESS) -->
            <dependency>
                <groupId>org.lsst</groupId>
                <artifactId>org-lsst-ccs-commons</artifactId>
                <version>6.2.14</version>
            </dependency>
            <dependency>
                <groupId>org.lsst</groupId>
                <artifactId>org-lsst-ccs-commons</artifactId>
                <version>6.2.14</version>
                <type>test-jar</type>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.lsst</groupId>
                <artifactId>org-lsst-ccs-groovy-description</artifactId>
                <version>6.2.14</version>
            </dependency>
            <dependency>
                <groupId>org.lsst</groupId>
                <artifactId>org-lsst-ccs-buses-definition</artifactId>
                <version>6.2.14</version>    
            </dependency>    
            <dependency>
                <groupId>org.lsst</groupId>
                <artifactId>org-lsst-ccs-buses-definition</artifactId>
                <type>test-jar</type>
                <version>6.2.14</version>    
            </dependency>
            <dependency>
                <groupId>org.lsst</groupId>
                <artifactId>org-lsst-ccs-messaging-layer</artifactId>
                <version>6.2.14</version>    
            </dependency>
            <dependency>
                <groupId>org.lsst</groupId>
                <artifactId>org-lsst-ccs-messaging-layer</artifactId>
                <type>test-jar</type>
                <version>6.2.14</version>    
            </dependency>
            <dependency>
                <groupId>org.lsst</groupId>
                <artifactId>org-lsst-ccs-messaging-mock</artifactId>
                <version>6.2.14</version>    
            </dependency>
            <dependency>
                <groupId>org.lsst</groupId>
                <artifactId>org-lsst-ccs-messaging-jgroups</artifactId>
                <version>6.2.14</version>    
            </dependency>
            <dependency>
                <groupId>org.lsst</groupId>
                <artifactId>org-lsst-ccs-messaging-jms</artifactId>
                <version>6.2.14</version>    
            </dependency>
            <dependency>
                <groupId>org.lsst</groupId>
                <artifactId>org-lsst-ccs-messaging-jms</artifactId>
                <version>6.2.14</version>
                <type>test-jar</type>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.lsst</groupId>
                <artifactId>org-lsst-ccs-core</artifactId>
                <version>6.2.14</version>    
            </dependency>
            <dependency>
                <groupId>org.lsst</groupId>
                <artifactId>org-lsst-ccs-core</artifactId>
                <type>test-jar</type>
                <version>6.2.14</version>    
            </dependency>
            <dependency>
                <groupId>org.lsst</groupId>
                <artifactId>org-lsst-ccs-config-definition</artifactId>
                <version>6.2.14</version>    
            </dependency>
            <dependency>
                <groupId>org.lsst</groupId>
                <artifactId>org-lsst-ccs-config-definition</artifactId>
                <type>test-jar</type>
                <version>6.2.14</version>    
            </dependency>
            <!-- TO HERE -->          
        </dependencies>
    </dependencyManagement>
    
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <excludedGroups>org.lsst.ccs.test.categories.IntegrationTest,org.lsst.ccs.test.categories.NightlyTest,org.lsst.ccs.test.categories.ManualTest</excludedGroups>
                    <environmentVariables>
                        <LD_LIBRARY_PATH>${project.basedir}/target/classes/lib64/jni/:${project.basedir}/target/classes/lib64/:${project.basedir}/target/distribution/lib64/jni/:${project.basedir}/target/distribution/lib64/</LD_LIBRARY_PATH>
                    </environmentVariables>
                    <argLine>@{surefireArgLine} -Xms2g -Xmx2g -Djava.util.logging.manager=org.lsst.ccs.utilities.logging.CCSLogManager -Djava.util.logging.config.class=org.lsst.ccs.utilities.logging.LogPropertiesLoader -Djava.library.path=${project.basedir}/target/classes/lib64/jni/:${project.basedir}/target/classes/lib64/:${project.basedir}/target/distribution/lib64/jni/:${project.basedir}/target/distribution/lib64/</argLine>
                    <trimStackTrace>false</trimStackTrace>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <profiles>
        <profile>
            <id>include-manual-tests</id>
            <activation>
                <property>
                    <name>org.lsst.ccs.include.manual.tests</name>
                    <value>true</value>
                </property>                
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <reportsDirectory>${project.build.directory}/nightly-test-reports</reportsDirectory>
                            <systemPropertyVariables>
                                <org.lsst.ccs.testcontext>true</org.lsst.ccs.testcontext>
                                <org.lsst.ccs.resource.path>${org.lsst.ccs.resource.path}</org.lsst.ccs.resource.path>
                                <bootstrap.default.org.lsst.ccs.workdir>/tmp</bootstrap.default.org.lsst.ccs.workdir>
                            </systemPropertyVariables>
                            <excludedGroups>org.lsst.ccs.test.categories.NightlyTest,org.lsst.ccs.test.categories.IntegrationTest</excludedGroups>
                        </configuration>
                    </plugin>                    
                </plugins>
            </build>
        </profile>        
        <profile>
            <id>include-nightly-tests</id>
            <activation>
                <property>
                    <name>org.lsst.ccs.include.nightly.tests</name>
                    <value>true</value>
                </property>                
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <reportsDirectory>${project.build.directory}/nightly-test-reports</reportsDirectory>
                            <systemPropertyVariables>
                                <org.lsst.ccs.testcontext>true</org.lsst.ccs.testcontext>
                                <org.lsst.ccs.resource.path>${org.lsst.ccs.resource.path}</org.lsst.ccs.resource.path>
                                <bootstrap.default.org.lsst.ccs.workdir>/tmp</bootstrap.default.org.lsst.ccs.workdir>
                            </systemPropertyVariables>
                            <excludedGroups>org.lsst.ccs.test.categories.ManualTest</excludedGroups>
                        </configuration>
                    </plugin>                    
                </plugins>
            </build>
        </profile>        
        <profile>
            <id>include-integration-tests</id>
            <activation>
                <property>
                    <name>org.lsst.ccs.include.integration.tests</name>
                    <value>true</value>
                </property>                
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <reportsDirectory>${project.build.directory}/nightly-test-reports</reportsDirectory>
                            <systemPropertyVariables>
                                <org.lsst.ccs.testcontext>true</org.lsst.ccs.testcontext>
                                <org.lsst.ccs.resource.path>${org.lsst.ccs.resource.path}</org.lsst.ccs.resource.path>
                                <bootstrap.default.org.lsst.ccs.workdir>/tmp</bootstrap.default.org.lsst.ccs.workdir>
                            </systemPropertyVariables>
                            <excludedGroups>org.lsst.ccs.test.categories.NightlyTest,org.lsst.ccs.test.categories.ManualTest</excludedGroups>
                        </configuration>
                    </plugin>                    
                </plugins>
            </build>
        </profile>                
    </profiles>
</project>
