<?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>org.rococoa</groupId>
  <artifactId>rococoa-core</artifactId>
  <packaging>jar</packaging>
  <name>Rococoa Core</name>
  <url>http://www.rococoa.org</url>
  
  <parent>
    <groupId>org.rococoa</groupId>
    <artifactId>rococoa-parent</artifactId>
    <version>0.5</version>
	<relativePath>../rococoa-parent</relativePath>
  </parent>
  
  <dependencies>
    <dependency>
      <groupId>net.java.dev.jna</groupId>
      <artifactId>jna</artifactId>
    </dependency>
    <dependency>
      <groupId>cglib</groupId>
      <artifactId>cglib</artifactId>
    </dependency>
  </dependencies>
  <build>  
    <plugins>
      <plugin>
		<artifactId>maven-jar-plugin</artifactId>
		<executions>
			<execution>
				<goals>
					<goal>test-jar</goal>
				</goals>
			</execution>
		</executions>
	  </plugin>
      <plugin>
		<artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <id>build-native</id>
            <phase>compile</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <tasks>
                <exec dir="." executable="xcodebuild" failonerror="true">               
                	<arg value="-project"/><arg value="rococoa.xcodeproj"/>
                	<arg value="-target"/><arg value="librococoa"/>
                	<arg value="-configuration"/><arg value="Release"/>
               	</exec>
              </tasks>
            </configuration>
          </execution>          
          <execution>
            <id>build-native-clean</id>
            <phase>clean</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <tasks>
                <exec dir="." executable="xcodebuild" failonerror="true">
                	<arg value="-project"/><arg value="rococoa.xcodeproj"/>
                	<arg value="-target"/><arg value="librococoa"/>
                	<arg value="-configuration"/><arg value="Release"/>
                	<arg value="clean"/>
                </exec>
              </tasks>
            </configuration>
          </execution>
        </executions>
      </plugin>
    
      <plugin>
		<artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <excludes>
            <!-- Brain-dead plugin just looks for *Test* and so finds support classes -->
            <exclude>**/TestStruct*.java</exclude>
          </excludes>
          <forkMode>once</forkMode>
        </configuration>        
      </plugin>      
         
      <plugin>
		<artifactId>maven-assembly-plugin</artifactId>
      </plugin>
      
      <plugin>
		<artifactId>maven-install-plugin</artifactId>
        <executions>
          <execution>
            <id>install-library</id>
            <phase>install</phase>
            <goals>
              <goal>install-file</goal>
            </goals>
            <configuration>
              <groupId>org.rococoa</groupId>
              <artifactId>rococoa-core</artifactId>
              <version>${parent.version}</version>
              <packaging>dylib</packaging>
              <file>${basedir}/build/Release/librococoa.dylib</file>
            </configuration>
          </execution>
        </executions>
      </plugin>
      
    </plugins>
      
  </build>

</project>
