<?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>jboss-jsfunit</artifactId>
    <groupId>org.jboss.jsfunit</groupId>
    <version>2.0.0.Beta2</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>jboss-jsfunit-microdeployer</artifactId>
  <name>JSFUnit Microcontainer deployer</name>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <version>1.1</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <skip>true</skip>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>jboss5x</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.cargo</groupId>
            <artifactId>cargo-maven2-plugin</artifactId>
            <executions>
              <execution>
                <id>start-container</id>
                <phase>pre-integration-test</phase>
                <goals>
                  <goal>start</goal>
                </goals>
              </execution>
              <execution>
                <id>stop-container</id>
                <phase>post-integration-test</phase>
                <goals>
                  <goal>stop</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <wait>false</wait>
              <configuration>
                <home>${project.build.directory}/cargoconfig</home>
                <files>
                  <copy>
                    <file>${project.build.directory}/${project.build.finalName}.jar</file>
                    <todir>deployers</todir>
                    <tofile>jboss-jsfunit-microdeployer.jar</tofile>
                    <configfile>false</configfile>
                    <overwrite>true</overwrite>
                  </copy>
                  <copy>
                    <file>${project.build.directory}/test-classes/org/jboss/jsfunit/jsfsession/hellojsf/FacadeAPITest.class</file>
                    <todir>jsfunitTests/org/jboss/jsfunit/jsfsession/hellojsf</todir>
                    <configfile>false</configfile>
                    <overwrite>true</overwrite>
                  </copy>
                  <copy>
                    <file>${project.build.directory}/test-classes/org/jboss/jsfunit/jsfsession/hellojsf/HelloJSFIntegrationTest.class</file>
                    <todir>jsfunitTests/org/jboss/jsfunit/jsfsession/hellojsf</todir>
                    <configfile>false</configfile>
                    <overwrite>true</overwrite>
                  </copy>
                </files>
                <deployables>
                  <deployable>
                    <location>${project.build.directory}/dependency/${webapp.name}.war</location>
                    <type>war</type>
                  </deployable>
                </deployables>
              </configuration>
              <container>
                <containerId>jboss51x</containerId>
                <timeout>480000</timeout>
                <home>${JBOSS_HOME}</home>
                <log>${basedir}/target/jboss5.x/cargo.log</log>
                <output>${basedir}/target/jboss5.x/container.log</output>
              </container>
            </configuration>
          </plugin>
          <plugin>
            <artifactId>maven-surefire-plugin</artifactId>
            <executions>
              <execution>
                <id>surefire-it</id>
                <phase>integration-test</phase>
                <goals>
                  <goal>test</goal>
                </goals>
                <configuration>
                  <skip>false</skip>
                  <systemProperties>
                    <property>
                      <name>cactus.contextURL</name>
                      <value>http://localhost:8080/${webapp.name}</value>
                    </property>
                  </systemProperties>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-dependency-plugin</artifactId>
            <executions>
              <execution>
                <id>copy-dependencies</id>
                <phase>package</phase>
                <goals>
                  <goal>copy</goal>
                </goals>
                <configuration>
                  <artifactItems>
                    <artifactItem>
                      <groupId>org.jboss.jsfunit</groupId>
                      <artifactId>jboss-jsfunit-examples-hellojsf-webapp</artifactId>
                      <version>${project.version}</version>
                      <type>war</type>
                      <destFileName>${webapp.name}.war</destFileName>
                    </artifactItem>
                  </artifactItems>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
  <dependencies>
    <dependency>
      <groupId>org.jboss.deployers</groupId>
      <artifactId>jboss-deployers-vfs</artifactId>
      <version>2.0.7.GA</version>
      <scope>provided</scope>
      <exclusions>
        <exclusion>
          <artifactId>jboss-deployers-vfs-spi</artifactId>
          <groupId>org.jboss.deployers</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jboss-kernel</artifactId>
          <groupId>org.jboss.microcontainer</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jboss-classloading-vfs</artifactId>
          <groupId>org.jboss.cl</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jboss-deployers-core</artifactId>
          <groupId>org.jboss.deployers</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jboss-deployers-client</artifactId>
          <groupId>org.jboss.deployers</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jboss-deployers-impl</artifactId>
          <groupId>org.jboss.deployers</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.jboss.metadata</groupId>
      <artifactId>jboss-metadata</artifactId>
      <version>1.0.1.GA</version>
      <scope>provided</scope>
      <exclusions>
        <exclusion>
          <artifactId>jboss-logging-spi</artifactId>
          <groupId>org.jboss.logging</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jboss-common-core</artifactId>
          <groupId>org.jboss</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jboss-ejb3-ext-api</artifactId>
          <groupId>org.jboss.ejb3</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jboss-ejb-api</artifactId>
          <groupId>org.jboss.javaee</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jboss-jms-api</artifactId>
          <groupId>org.jboss.javaee</groupId>
        </exclusion>
        <exclusion>
          <artifactId>ejb3-persistence</artifactId>
          <groupId>org.hibernate</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jboss-transaction-api</artifactId>
          <groupId>org.jboss.javaee</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jbossws-spi</artifactId>
          <groupId>org.jboss.ws</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jboss-jaxws</artifactId>
          <groupId>jboss.jbossws</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jbossxb</artifactId>
          <groupId>org.jboss</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jboss-vfs</artifactId>
          <groupId>org.jboss</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jboss-mdr</artifactId>
          <groupId>org.jboss</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jaxb-api</artifactId>
          <groupId>sun-jaxb</groupId>
        </exclusion>
        <exclusion>
          <artifactId>xml-apis</artifactId>
          <groupId>apache-xerces</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>jboss.web</groupId>
      <artifactId>servlet-api</artifactId>
      <version>3.0.0-beta-2</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>xalan</groupId>
      <artifactId>xalan</artifactId>
      <version>2.7.1</version>
      <scope>provided</scope>
      <exclusions>
        <exclusion>
          <artifactId>serializer</artifactId>
          <groupId>xalan</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>xerces</groupId>
      <artifactId>xercesImpl</artifactId>
      <version>2.8.1</version>
      <scope>provided</scope>
      <exclusions>
        <exclusion>
          <artifactId>xml-apis</artifactId>
          <groupId>xml-apis</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>javax.faces</groupId>
      <artifactId>jsf-api</artifactId>
      <version>2.0.1-FCS</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <properties>
    <webapp.name>hellojsf-webapp-jsfunit</webapp.name>
  </properties>
</project>

