<?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">
    <parent>
        <groupId>org.lsst</groupId>
        <artifactId>org-lsst-ccs-camera-sal-xml-parent</artifactId>
        <version>42.0.1</version>
        <relativePath>../</relativePath>
    </parent>

    <name>LSST CCS - Camera SAL XML Files</name>
    <groupId>org.lsst</groupId>
    <artifactId>org-lsst-ccs-camera-sal-xml</artifactId>
    <version>42.0.1</version>
    <packaging>jar</packaging>
    <modelVersion>4.0.0</modelVersion>
    <url>${org.lsst.ccs.site.url}</url>

    <properties>
        <org.lsst.ccs.site.url>https://repo-nexus.lsst.org/nexus/content/sites/${org.lsst.ccs.site.name}/site-root/org-lsst-ccs-camera-sal-xml-parent/${project.version}/${project.artifactId}</org.lsst.ccs.site.url>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.lsst</groupId>
            <artifactId>org-lsst-ccs-camera-sal-xml-core</artifactId>
            <version>42.0.1</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <version>3.1.0</version>
                <executions>
                    <execution>
                        <id>generateSALxml</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>java</goal>
                        </goals>                        
                        <configuration>
                            <mainClass>org.lsst.ccs.camera.sal.xml.maker.MakeAllXML</mainClass>
                            <classpathScope>runtime</classpathScope>
                            <arguments>${project.basedir}/src/main/resources/xml/,${project.basedir}/src/main/resources/org/lsst/ccs/camera/sal/xml/maker</arguments>
                        </configuration>
                    </execution>
                    <execution>
                        <id>generateAvroSchema</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>java</goal>
                        </goals>                        
                        <configuration>
                            <mainClass>org.lsst.ccs.camera.kafka.avro.AvroSchemaGenerator</mainClass>
                            <classpathScope>runtime</classpathScope>
                            <arguments>${project.basedir}/src/main/resources/avro/</arguments>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>3.1.2</version>
                <configuration>
                    <systemPropertyVariables>
                        <no.missing.sal.class.warning>true</no.missing.sal.class.warning>
                        <test.running>true</test.running>
                    </systemPropertyVariables>
                </configuration>                        
            </plugin>
        </plugins>
    </build>
</project>
