<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-base</artifactId>
       <version>6.2.13</version>
        <relativePath>../base/</relativePath>
    </parent>

    <modelVersion>4.0.0</modelVersion>
    <artifactId>org-lsst-ccs-drivers</artifactId>
    <packaging>pom</packaging>
    <name>LSST CCS - Drivers Parent (Pom)</name>


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

    <dependencies>
        <dependency>
            <groupId>org.lsst</groupId>
            <artifactId>org-lsst-ccs-command</artifactId>
        </dependency>
        <dependency>
            <groupId>org.lsst</groupId>
            <artifactId>org-lsst-ccs-utilities</artifactId>
        </dependency>
        <dependency>
            <groupId>org.lsst</groupId>
            <artifactId>org-lsst-ccs-commons</artifactId>
        </dependency>
    </dependencies>

    <issueManagement>
        <system>Jira</system>
        <url>https://jira.slac.stanford.edu/browse/LSSTCCSDRIVER</url>
    </issueManagement>

    <profiles>
        <profile>
            <id>buildJNI</id>
            <activation>
                <file>
                    <exists>./src/main/c</exists>
                </file>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-antrun-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>build-native</id>
                                <phase>compile</phase>
                                <goals>
                                    <goal>run</goal>
                                </goals>
                                <configuration>
                                    <tasks>
                                        <property name="native.classpath" refid="maven.compile.classpath" />
                                        <echo file="${project.build.directory}/compile-classpath" message="${native.classpath}" />
                                        <exec dir="src/main/c" executable="make" failonerror="true" />
                                    </tasks>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>doAssemblyAndDistribution</id>
            <activation>
                <file>
                    <missing>build/skipAssemblyAndDistribution.foo</missing>
                </file>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-assembly-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.lsst</groupId>
                        <artifactId>org-lsst-ccs-maven-plugin-distribution</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>setDriverType</id>
            <activation>
                <file>
                    <missing>build/driver_type.foo</missing>
                </file>
            </activation>
            <properties>
                <org_lsst_ccs_project_type>driver</org_lsst_ccs_project_type>
                <org_lsst_ccs_project_jira_prefix />
            </properties>
        </profile>
    </profiles>

</project>
