<?xml version="1.0" encoding="UTF-8"?>

  <!-- ====================================================================== -->
  <!--                                                                        -->
  <!--  JBoss, the OpenSource J2EE webOS                                      -->
  <!--                                                                        -->
  <!--  Distributable under LGPL license.                                     -->
  <!--  See terms of license at http://www.gnu.org.                           -->
  <!--                                                                        -->
  <!-- ====================================================================== -->

  <!-- $Id: pom.xml 3490 2008-12-20 16:06:15Z thomas.diesler@jboss.com $ -->
<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>
  <name>JBoss BPM Spec - CTS</name>
  <groupId>org.jboss.bpm</groupId>
  <artifactId>bpm-spec-cts</artifactId>
  <packaging>jar</packaging>

  <!-- Parent -->
  <parent>
    <groupId>org.jboss.bpm</groupId>
    <artifactId>bpm-spec</artifactId>
    <version>1.0.0-Alpha1</version>
    <relativePath>../../pom.xml</relativePath>
  </parent>

  <!-- Properties -->
  <properties>
  </properties>

  <!-- Dependencies -->
  <dependencies>
    <dependency>
      <groupId>org.jboss.bpm</groupId>
      <artifactId>bpm-spec-api</artifactId>
      <version>${version}</version>
    </dependency>
  </dependencies>

  <!-- Plugins -->
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <executions>
          <execution>
            <id>testsuite</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
            <configuration>
              <appendAssemblyId>false</appendAssemblyId>
              <descriptors>
                <descriptor>scripts/assembly-testsuite.xml</descriptor>
              </descriptors>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-artifacts</id>
            <phase>package</phase>
            <goals>
              <goal>attach-artifact</goal>
            </goals>
            <configuration>
              <artifacts>
                <artifact>
                  <file>target/${project.artifactId}-${project.version}.zip 
                  </file>
                  <type>zip</type>
                </artifact>
              </artifacts>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <includes>
            <include>org/jboss/bpm/cts/**/*Test.java</include>
          </includes>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <!-- Profiles -->  
  <profiles>
  
    <!--
    Name:  no-impl
    Descr: Setup the default impl
    -->
    <profile>
      <id>no-impl</id>
      <activation>
        <property>
          <name>_impl</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <skipTests>true</skipTests>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <!--
    Name:  impl-jbpm3
    Descr: Setup the jBPM3 Implementation
    -->
    <profile>
      <id>impl-jbpm3</id>
      <activation>
        <property>
          <name>!impl</name>
          <!-- value>jbpm3</value -->
        </property>
      </activation>
      <dependencies>
        <dependency>
          <groupId>hsqldb</groupId>
          <artifactId>hsqldb</artifactId>
          <version>1.8.0.7</version>
          <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>org.jbpm.jbpm3</groupId>
          <artifactId>jbpm-integration-spec</artifactId>
          <version>${jbpm3.version}</version>
          <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>org.jbpm.jbpm3</groupId>
          <artifactId>jbpm-integration-spec</artifactId>
          <classifier>config</classifier>
          <version>${jbpm3.version}</version>
          <scope>test</scope>
        </dependency>
      </dependencies>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <systemProperties>
                <property>
                  <name>bpm.dialect</name>
                  <value>jbpm3</value>
                </property>
                <property>
                  <name>bpm.dialect.uri</name>
                  <value>urn:jbpm.org:jpdl-3.2</value>
                </property>
                <property>
                  <name>log4j.output.dir</name>
                  <value>${basedir}/target</value>
                </property>
              </systemProperties>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>
