<?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>edu.wpi.first.wpilibc.simulation</groupId>
  <artifactId>WPILibCSim</artifactId>
  <version>0.1.0</version>
  <packaging>pom</packaging>

  <build>
	<plugins>
      <plugin>
		<groupId>org.apache.maven.plugins</groupId>
		<artifactId>maven-antrun-plugin</artifactId>
		<version>1.7</version>
		<executions>
		  <execution>
			<id>zip-cpp-sim-includes</id>
			<phase>compile</phase>
			<goals>
			  <goal>run</goal>
			</goals>
			<configuration>
			  <target>
                <mkdir dir="${project.build.directory}/sim-includes/sim/include"/>
                <copy todir="${project.build.directory}/sim-includes/sim/include">
                  <fileset dir="include"/>
                  <fileset dir="../../networktables/cpp/include"/>
                  <fileset dir="../../hal/include"/>
                </copy>
				<zip destfile="${project.build.directory}/${project.build.finalName}.zip"
                     basedir="${project.build.directory}/sim-includes" />
			  </target>
			</configuration>
		  </execution>
		</executions>
	  </plugin>
	  <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <version>1.2</version>
        <executions>
          <execution>
		    <id>zip-cpp-includes</id>
		    <phase>package</phase>
		    <goals>
			  <goal>attach-artifact</goal>
			</goals>
            <configuration>
              <artifacts>
                <artifact>
                  <file>${project.build.directory}/${project.build.finalName}.zip</file>
                  <type>zip</type>
                </artifact>
              </artifacts>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
