<?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/maven-v4_0_0.xsd">

	<modelVersion>4.0.0</modelVersion>
  <artifactId>joram-samples</artifactId>
  <packaging>pom</packaging>
  <name>JORAM :: joram :: samples</name>
  <description>Builds the Joram samples project.</description>

	<parent>
		<artifactId>parent</artifactId>
		<groupId>org.ow2.joram</groupId>
		<version>5.9.1</version>
	</parent>

  <build>
    <plugins>
      <!-- clean -->
      <plugin>
        <artifactId>maven-clean-plugin</artifactId>
        <version>2.4.1</version>
        <configuration>
          <filesets>
            <fileset>
              <directory>../ship</directory>
              <followSymlinks>false</followSymlinks>
            </fileset>
          </filesets>
        </configuration>
      </plugin>
      
      <!-- on deploy phase: zip src, config, ... -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-assembly-plugin</artifactId>
        <executions>
          <execution>
            <id>joram-samples</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
            <configuration>
              <descriptors>
                <descriptor>samples-assembly.xml</descriptor>
              </descriptors>
              <appendAssemblyId>false</appendAssemblyId>
              <ignoreDirFormatExtensions>false</ignoreDirFormatExtensions>
            </configuration>
          </execution>
        </executions>
      </plugin>
      
      <!-- ship -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>unpack</id>
            <phase>package</phase>
            <goals>
              <goal>unpack</goal>
            </goals>
            <configuration>
              <artifactItems>
                <artifactItem>
                  <groupId>org.ow2.joram</groupId>
                  <artifactId>joram-assembly</artifactId>
                  <type>zip</type>
                  <excludes>**/pom.*,**/META-INF/**</excludes>
                </artifactItem>
              </artifactItems>
              <outputDirectory>.</outputDirectory>
              <overWriteReleases>false</overWriteReleases>
              <overWriteSnapshots>true</overWriteSnapshots>
              <outputDirectory>..</outputDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  
  <dependencies>
    <dependency>
      <groupId>org.ow2.joram</groupId>
      <artifactId>joram-assembly</artifactId>
      <version>${project.version}</version>
      <type>zip</type>
    </dependency>
  </dependencies>
</project>