<?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">
  <parent>
    <artifactId>tomcat-all</artifactId>
    <groupId>org.jboss.narayana.tomcat</groupId>
    <version>5.7.2.Final</version>
    <relativePath>../../pom.xml</relativePath>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>tomcat-jta</artifactId>
  <name>Narayana: Tomcat JTA integration</name>
  <build>
    <plugins>
      <plugin>
        <groupId>org.sonatype.plugins</groupId>
        <artifactId>nexus-staging-maven-plugin</artifactId>
        <inherited>false</inherited>
      </plugin>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <promoteTransitiveDependencies>true</promoteTransitiveDependencies>
              <artifactSet>
                <includes>
                  <include>org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec</include>
                  <include>org.jboss.narayana:common</include>
                  <include>org.jboss.narayana.arjunacore:arjuna</include>
                  <include>org.jboss.narayana.jta:jta</include>
                  <include>org.jboss.narayana.jta:jdbc</include>
                  <include>org.jboss:jboss-transaction-spi</include>
                  <include>org.jboss.logging:jboss-logging</include>
                </includes>
              </artifactSet>
              <transformers>
                <transformer>
                  <manifestEntries>
                    <arjuna-properties-file>jbossts-properties.xml</arjuna-properties-file>
                  </manifestEntries>
                </transformer>
              </transformers>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <skip>true</skip>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>arq-tomcat</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-failsafe-plugin</artifactId>
            <executions>
              <execution>
                <goals>
                  <goal>integration-test</goal>
                </goals>
                <configuration>
                  <skip>false</skip>
                  <redirectTestOutputToFile>true</redirectTestOutputToFile>
                  <systemPropertyVariables>
                    <version.org.jboss.narayana>${project.version}</version.org.jboss.narayana>
                    <version.org.jboss.resteasy>${version.org.jboss.resteasy}</version.org.jboss.resteasy>
                    <version.com.h2database>${version.com.h2database}</version.com.h2database>
                    <server.jvm.args>${server.jvm.args}</server.jvm.args>
                  </systemPropertyVariables>
                </configuration>
              </execution>
              <execution>
                <id>verify</id>
                <phase>verify</phase>
                <goals>
                  <goal>verify</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-dependency-plugin</artifactId>
            <executions>
              <execution>
                <id>copy-dependencies</id>
                <phase>test-compile</phase>
                <goals>
                  <goal>copy-dependencies</goal>
                </goals>
                <configuration>
                  <stripVersion>true</stripVersion>
                  <includeGroupIds>org.jboss.byteman</includeGroupIds>
                  <outputDirectory>${project.build.directory}/lib</outputDirectory>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
      <dependencies>
        <dependency>
          <groupId>org.jboss.arquillian.container</groupId>
          <artifactId>arquillian-tomcat-managed-7</artifactId>
          <version>${version.org.jboss.arquillian.container.tomcat}</version>
          <scope>test</scope>
        </dependency>
      </dependencies>
    </profile>
    <profile>
      <id>codeCoverage</id>
      <properties>
        <server.jvm.args>${jvm.args.byteman} ${jvm.args.debug} ${jvm.args.jacoco}</server.jvm.args>
      </properties>
    </profile>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-install-plugin</artifactId>
            <version>2.5.2</version>
            <executions>
              <execution>
                <id>default-install</id>
                <phase>install</phase>
                <goals>
                  <goal>install</goal>
                </goals>
              </execution>
            </executions>
            <inherited>false</inherited>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
  <dependencies>
    <dependency>
      <groupId>org.jboss.spec.javax.resource</groupId>
      <artifactId>jboss-connector-api_1.7_spec</artifactId>
      <version>1.0.0.Final</version>
      <scope>compile</scope>
    </dependency>
  </dependencies>
  <properties>
    <jvm.args.byteman>-Dorg.jboss.byteman.verbose -Djboss.modules.system.pkgs=org.jboss.byteman -Dorg.jboss.byteman.transform.all
            -javaagent:${project.build.directory}/lib/byteman.jar=script:${project.build.directory}/test-classes/scripts.btm,listener:true</jvm.args.byteman>
    <server.jvm.args>${jvm.args.byteman} ${jvm.args.debug}</server.jvm.args>
  </properties>
</project>

