<?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>
  <parent>
    <groupId>org.activiti</groupId>
    <artifactId>activiti-core-dependencies</artifactId>
    <version>7.0.0.SR1</version>
    <relativePath>../activiti-core-dependencies</relativePath>
  </parent>
  <artifactId>activiti-spring</artifactId>
  <name>Activiti :: Spring</name>
  <dependencies>
    <dependency>
      <groupId>org.activiti</groupId>
      <artifactId>activiti-bpmn-converter</artifactId>
    </dependency>
    <dependency>
      <groupId>org.activiti</groupId>
      <artifactId>activiti-bpmn-model</artifactId>
    </dependency>
    <dependency>
      <groupId>org.activiti</groupId>
      <artifactId>activiti-process-validation</artifactId>
    </dependency>
    <dependency>
      <groupId>org.activiti</groupId>
      <artifactId>activiti-engine</artifactId>
    </dependency>
    <dependency>
      <groupId>org.activiti.api</groupId>
      <artifactId>activiti-api-runtime-shared</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-beans</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-context</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-jdbc</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-tx</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-orm</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-test</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-lang3</artifactId>
    </dependency>
    <dependency>
      <groupId>javax.el</groupId>
      <artifactId>el-api</artifactId>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.codehaus.groovy</groupId>
      <artifactId>groovy</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.codehaus.groovy</groupId>
      <artifactId>groovy-jsr223</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.h2database</groupId>
      <artifactId>h2</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.subethamail</groupId>
      <artifactId>subethasmtp-wiser</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-dbcp2</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>jcl-over-slf4j</artifactId>
    </dependency>
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-entitymanager</artifactId>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>javax.xml.bind</groupId>
      <artifactId>jaxb-api</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <profiles>
    <profile>
      <id>check</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-antrun-plugin</artifactId>
            <executions>
              <execution>
                <id>delete-test-sources</id>
                <phase>generate-sources</phase>
                <configuration>
                  <tasks>
                    <delete dir="src/test/java/org/activiti/engine/test" />
                    <delete dir="src/test/resources/org/activiti/engine/test" />
                    <delete dir="src/test/java/org/activiti/examples" />
                    <delete dir="src/test/resources/org/activiti/examples" />
                    <delete dir="src/test/java/org/activiti/standalone" />
                    <delete dir="src/test/resources/org/activiti/standalone" />
                  </tasks>
                </configuration>
                <goals>
                  <goal>run</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>checkspring</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-antrun-plugin</artifactId>
            <executions>
              <execution>
                <id>copy-test-sources-from-engine</id>
                <phase>generate-sources</phase>
                <goals>
                  <goal>run</goal>
                </goals>
                <configuration>
                  <tasks>
                    <delete dir="src/test/java/org/activiti/engine/test" />
                    <delete dir="src/test/resources/org/activiti/engine/test" />
                    <delete dir="src/test/java/org/activiti/examples" />
                    <delete dir="src/test/resources/org/activiti/examples" />
                    <delete dir="src/test/java/org/activiti/standalone" />
                    <delete dir="src/test/resources/org/activiti/standalone" />
                    <copy todir="src/test/java" overwrite="true">
                      <fileset dir="../activiti-engine/src/test/java" />
                    </copy>
                    <copy todir="src/test/resources" overwrite="true">
                      <fileset dir="../activiti-engine/src/test/resources" />
                    </copy>
                  </tasks>
                </configuration>
              </execution>
              <execution>
                <id>delete-test-sources-after</id>
                <phase>package</phase>
                <goals>
                  <goal>run</goal>
                </goals>
                <configuration>
                  <tasks>
                    <delete dir="src/test/java/org/activiti/engine/test" />
                    <delete dir="src/test/resources/org/activiti/engine/test" />
                    <delete dir="src/test/java/org/activiti/examples" />
                    <delete dir="src/test/resources/org/activiti/examples" />
                    <delete dir="src/test/java/org/activiti/standalone" />
                    <delete dir="src/test/resources/org/activiti/standalone" />
                  </tasks>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <systemProperties>
                <property>
                  <name>process.engine.initializer</name>
                  <value>org.activiti.spring.SpringProcessEngineInitializer</value>
                </property>
              </systemProperties>
              <excludes>
                <exclude>org/activiti/standalone/**</exclude>
                <exclude>**/*TestCase.java</exclude>
                <!-- Can't run in Spring since ActivitiRule must be used different in Spring -->
                <exclude>**/ActivitiRuleJunit4Test.java</exclude>
                <!-- https://activiti.atlassian.net/browse/ACT-234 -->
                <exclude>**/CompetingJobAcquisitionTest.java</exclude>
                <!-- https://activiti.atlassian.net/browse/ACT-315 -->
                <exclude>**/WSDLImporterTest.java</exclude>
                <!-- https://activiti.atlassian.net/browse/ACT-427 -->
                <exclude>**/JobExecutorTest.java</exclude>
                <!-- https://activiti.atlassian.net/browse/ACT-485 -->
                <exclude>**/HistoricTaskInstanceUpdateTest.java</exclude>
              </excludes>
              <runOrder>alphabetical</runOrder>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
