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

<!-- Copyright 2011 Lincoln Baxter, III Licensed under the Apache License, 
   Version 2.0 (the "License"); you may not use this file except in compliance 
   with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 
   Unless required by applicable law or agreed to in writing, software distributed 
   under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES 
   OR CONDITIONS OF ANY KIND, either express or implied. See the License for 
   the specific language governing permissions and limitations under the License. -->

<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>
   <groupId>org.ocpsoft.rewrite</groupId>
   <artifactId>rewrite-parent</artifactId>
   <version>2.0.12.Final</version>
   <packaging>pom</packaging>

   <parent>
      <groupId>org.ocpsoft</groupId>
      <artifactId>ocpsoft-parent</artifactId>
      <version>9</version>
   </parent>

   <properties>
      <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
      <version.jboss.spec>3.0.2.Final</version.jboss.spec>
      <version.junit>4.11</version.junit>
      <version.common>1.0.5.Final</version.common>
      <version.logging>1.0.2.Final</version.logging>
      <version.arquillian>1.1.1.Final</version.arquillian>
      <version.arquillian.drone>1.1.1.Final</version.arquillian.drone>
      <version.arquillian.jetty>1.0.0.CR2</version.arquillian.jetty>
      <version.arquillian.glassfish>1.0.0.CR4</version.arquillian.glassfish>
      <version.arquillian.tomcat>1.0.0.CR5</version.arquillian.tomcat>
      <version.jetty>8.1.2.v20120308</version.jetty>
      <version.jbossas>7.1.1.Final</version.jbossas>
      <version.wildfly>8.0.0.CR1</version.wildfly>
      <version.tomcat>7.0.42</version.tomcat>
      <version.glassfish3>3.1.2.2</version.glassfish3>
      <version.glassfish4>4.0</version.glassfish4>
      <container.download.dir>${java.io.tmpdir}/rewrite-arquillian-containers</container.download.dir>
   </properties>

   <modules>
      <module>test-base</module>
      <module>test-harness</module>
      <module>api</module>
      <module>api-tests</module>
      <module>impl</module>
      <module>impl-tests</module>
      <module>annotations-api</module>
      <module>annotations-impl</module>
      <module>config-annotations</module>
      <module>config-jodatime</module>
      <module>config-prettyfaces</module>
      <module>config-prettyfaces-tests</module>
      <module>config-proxy</module>
      <module>config-servlet</module>
      <module>config-servlet-tests</module>
      <module>config-tuckey</module>
      <module>addressbuilder</module>
      <module>api-el</module>
      <module>api-servlet</module>
      <module>impl-servlet</module>
      <module>impl-servlet-2.5</module>
      <module>impl-servlet-3.0</module>
      <module>impl-servlet-tests</module>
      <module>transform</module>
      <module>transform-less</module>
      <module>transform-minify</module>
      <module>transform-markup</module>
      <module>integration-cdi</module>
      <module>integration-cdi-tests</module>
      <module>integration-faces</module>
      <module>integration-faces-tests</module>
      <module>integration-gwt</module>
      <module>integration-spring</module>
      <module>security-integration-shiro</module>
      <module>rewrite-servlet</module>
      <module>showcase</module>
      <module>distribution</module>
      <module>examples</module>
      <module>documentation</module>
   </modules>

   <build>
      <plugins>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-release-plugin</artifactId>
            <configuration>
               <!-- Use local git repository instead of cloning the origin 
                  repository -->
               <localCheckout>true</localCheckout>
               <!-- All submodules share the same version -->
               <autoVersionSubmodules>true</autoVersionSubmodules>
               <!-- The tag should be named exactly like the version -->
               <tagNameFormat>@{project.version}</tagNameFormat>
               <!-- Never push automatically -->
               <pushChanges>false</pushChanges>
            </configuration>
         </plugin>
      </plugins>
      <pluginManagement>
         <plugins>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-surefire-plugin</artifactId>
               <version>2.16</version>
               <configuration>
                  <argLine>-Xms256m -Xmx512m -XX:MaxPermSize=512m</argLine>
               </configuration>
            </plugin>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-javadoc-plugin</artifactId>
               <version>2.9</version>
               <configuration>
                  <links>
                     <link>http://docs.oracle.com/javase/7/docs/api/</link>
                     <link>http://docs.oracle.com/javaee/6/api/</link>
                  </links>
               </configuration>
            </plugin>
         </plugins>
      </pluginManagement>

      <!-- Workaround for: https://jira.codehaus.org/browse/MNG-5525 -->
      <extensions>
         <extension>
            <groupId>org.apache.maven.wagon</groupId>
            <artifactId>wagon-http-lightweight</artifactId>
            <version>1.0</version>
         </extension>
      </extensions>

   </build>

   <dependencyManagement>
      <dependencies>
         <dependency>
            <groupId>org.ocpsoft.common</groupId>
            <artifactId>common-api</artifactId>
            <version>${version.common}</version>
         </dependency>
         <dependency>
            <groupId>org.ocpsoft.logging</groupId>
            <artifactId>logging-api</artifactId>
            <version>${version.logging}</version>
         </dependency>
         <dependency>
            <groupId>org.ocpsoft.logging</groupId>
            <artifactId>logging-adapter-slf4j</artifactId>
            <version>${version.logging}</version>
         </dependency>
         <dependency>
            <groupId>org.ocpsoft.rewrite</groupId>
            <artifactId>rewrite-api</artifactId>
            <version>${project.version}</version>
         </dependency>
         <dependency>
            <groupId>org.ocpsoft.rewrite</groupId>
            <artifactId>rewrite-api</artifactId>
            <version>${project.version}</version>
            <classifier>sources</classifier>
         </dependency>
         <dependency>
            <groupId>org.ocpsoft.rewrite</groupId>
            <artifactId>rewrite-api-el</artifactId>
            <version>${project.version}</version>
         </dependency>
         <dependency>
            <groupId>org.ocpsoft.rewrite</groupId>
            <artifactId>rewrite-api-el</artifactId>
            <version>${project.version}</version>
            <classifier>sources</classifier>
         </dependency>
         <dependency>
            <groupId>org.ocpsoft.rewrite</groupId>
            <artifactId>rewrite-impl</artifactId>
            <version>${project.version}</version>
         </dependency>
         <dependency>
            <groupId>org.ocpsoft.rewrite</groupId>
            <artifactId>rewrite-impl</artifactId>
            <version>${project.version}</version>
            <classifier>sources</classifier>
         </dependency>
         <dependency>
            <groupId>org.ocpsoft.rewrite</groupId>
            <artifactId>rewrite-config-annotations</artifactId>
            <version>${project.version}</version>
         </dependency>
         <dependency>
            <groupId>org.ocpsoft.rewrite</groupId>
            <artifactId>rewrite-config-annotations</artifactId>
            <version>${project.version}</version>
            <classifier>sources</classifier>
         </dependency>
         <dependency>
            <groupId>org.ocpsoft.rewrite</groupId>
            <artifactId>rewrite-annotations-api</artifactId>
            <version>${project.version}</version>
         </dependency>
         <dependency>
            <groupId>org.ocpsoft.rewrite</groupId>
            <artifactId>rewrite-annotations-api</artifactId>
            <version>${project.version}</version>
            <classifier>sources</classifier>
         </dependency>
         <dependency>
            <groupId>org.ocpsoft.rewrite</groupId>
            <artifactId>rewrite-annotations-impl</artifactId>
            <version>${project.version}</version>
         </dependency>
         <dependency>
            <groupId>org.ocpsoft.rewrite</groupId>
            <artifactId>rewrite-annotations-impl</artifactId>
            <version>${project.version}</version>
            <classifier>sources</classifier>
         </dependency>
         <dependency>
            <groupId>org.ocpsoft.rewrite</groupId>
            <artifactId>rewrite-config-jodatime</artifactId>
            <version>${project.version}</version>
         </dependency>
         <dependency>
            <groupId>org.ocpsoft.rewrite</groupId>
            <artifactId>rewrite-config-prettyfaces</artifactId>
            <version>${project.version}</version>
         </dependency>
         <dependency>
            <groupId>org.ocpsoft.rewrite</groupId>
            <artifactId>rewrite-config-tuckey</artifactId>
            <version>${project.version}</version>
         </dependency>
         <dependency>
            <groupId>org.ocpsoft.rewrite</groupId>
            <artifactId>rewrite-config-servlet</artifactId>
            <version>${project.version}</version>
         </dependency>
         <dependency>
            <groupId>org.ocpsoft.rewrite</groupId>
            <artifactId>rewrite-config-servlet</artifactId>
            <version>${project.version}</version>
            <classifier>sources</classifier>
         </dependency>
         <dependency>
            <groupId>org.ocpsoft.rewrite</groupId>
            <artifactId>rewrite-addressbuilder</artifactId>
            <version>${project.version}</version>
         </dependency>
         <dependency>
            <groupId>org.ocpsoft.rewrite</groupId>
            <artifactId>rewrite-addressbuilder</artifactId>
            <version>${project.version}</version>
            <classifier>sources</classifier>
         </dependency>
         <dependency>
            <groupId>org.ocpsoft.rewrite</groupId>
            <artifactId>rewrite-api-servlet</artifactId>
            <version>${project.version}</version>
         </dependency>
         <dependency>
            <groupId>org.ocpsoft.rewrite</groupId>
            <artifactId>rewrite-api-servlet</artifactId>
            <version>${project.version}</version>
            <classifier>sources</classifier>
         </dependency>
         <dependency>
            <groupId>org.ocpsoft.rewrite</groupId>
            <artifactId>rewrite-impl-servlet</artifactId>
            <version>${project.version}</version>
         </dependency>
         <dependency>
            <groupId>org.ocpsoft.rewrite</groupId>
            <artifactId>rewrite-impl-servlet-2.5</artifactId>
            <version>${project.version}</version>
         </dependency>
         <dependency>
            <groupId>org.ocpsoft.rewrite</groupId>
            <artifactId>rewrite-impl-servlet-3.0</artifactId>
            <version>${project.version}</version>
         </dependency>
         <dependency>
            <groupId>org.ocpsoft.rewrite</groupId>
            <artifactId>rewrite-impl-servlet</artifactId>
            <version>${project.version}</version>
            <classifier>sources</classifier>
         </dependency>
         <dependency>
            <groupId>org.ocpsoft.rewrite</groupId>
            <artifactId>rewrite-servlet</artifactId>
            <version>${project.version}</version>
         </dependency>
         <dependency>
            <groupId>org.ocpsoft.rewrite</groupId>
            <artifactId>rewrite-integration-cdi</artifactId>
            <version>${project.version}</version>
         </dependency>
         <dependency>
            <groupId>org.ocpsoft.rewrite</groupId>
            <artifactId>rewrite-integration-faces</artifactId>
            <version>${project.version}</version>
         </dependency>
         <dependency>
            <groupId>org.ocpsoft.rewrite</groupId>
            <artifactId>rewrite-security-integration-shiro</artifactId>
            <version>${project.version}</version>
         </dependency>
         <dependency>
            <groupId>org.ocpsoft.rewrite</groupId>
            <artifactId>rewrite-transform</artifactId>
            <version>${project.version}</version>
         </dependency>
         <dependency>
            <groupId>org.ocpsoft.rewrite</groupId>
            <artifactId>rewrite-transform-less</artifactId>
            <version>${project.version}</version>
         </dependency>
         <dependency>
            <groupId>org.ocpsoft.rewrite</groupId>
            <artifactId>rewrite-transform-markup</artifactId>
            <version>${project.version}</version>
         </dependency>
         <dependency>
            <groupId>org.ocpsoft.rewrite</groupId>
            <artifactId>rewrite-transform-minify</artifactId>
            <version>${project.version}</version>
         </dependency>
         <dependency>
            <groupId>org.ocpsoft.rewrite</groupId>
            <artifactId>rewrite-test-base</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
         </dependency>
         <dependency>
            <groupId>org.ocpsoft.rewrite</groupId>
            <artifactId>rewrite-test-harness</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
         </dependency>

         <dependency>
            <groupId>org.jboss.spec</groupId>
            <artifactId>jboss-javaee-6.0</artifactId>
            <version>${version.jboss.spec}</version>
            <type>pom</type>
            <scope>import</scope>
         </dependency>

         <!-- Enforce this version of Xalan, because jboss-javaee-6.0 depends
              on a version which isn't available in central. As this dependency
              is used only in 'provided' scope, this should be ok. -->
         <dependency>
            <groupId>xalan</groupId>
            <artifactId>xalan</artifactId>
            <version>2.7.1</version>
         </dependency>

         <dependency>
            <groupId>org.jboss.spec.javax.servlet</groupId>
            <artifactId>jboss-servlet-api_2.5_spec</artifactId>
            <version>1.0.1.Final</version>
            <scope>provided</scope>
         </dependency>

         <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${version.junit}</version>
            <scope>test</scope>
         </dependency>


         <!-- Enfore new ShrinkWrap Resolvers version -->
         <!-- Overwrites 1.x.y pulled in by Arquillian -->
         <dependency>
            <groupId>org.jboss.shrinkwrap.resolver</groupId>
            <artifactId>shrinkwrap-resolver-bom</artifactId>
            <version>2.0.0</version>
            <type>pom</type>
            <scope>import</scope>
         </dependency>

         <dependency>
            <groupId>org.jboss.arquillian</groupId>
            <artifactId>arquillian-bom</artifactId>
            <version>${version.arquillian}</version>
            <type>pom</type>
            <scope>import</scope>
         </dependency>
         <dependency>
            <groupId>org.jboss.arquillian.extension</groupId>
            <artifactId>arquillian-drone-bom</artifactId>
            <version>${version.arquillian.drone}</version>
            <type>pom</type>
            <scope>import</scope>
         </dependency>
      </dependencies>
   </dependencyManagement>

   <dependencies>
      <dependency>
         <groupId>junit</groupId>
         <artifactId>junit</artifactId>
         <scope>test</scope>
      </dependency>
   </dependencies>


   <profiles>
      <profile>
         <id>JETTY_EMBEDDED_8.X</id>
         <dependencies>
            <dependency>
               <groupId>org.jboss.arquillian.container</groupId>
               <artifactId>arquillian-jetty-embedded-7</artifactId>
               <version>${version.arquillian.jetty}</version>
               <scope>test</scope>
               <exclusions>
                  <!-- Don't include the old version of arquillian-container-spi -->
                  <exclusion>
                     <groupId>org.jboss.arquillian.container</groupId>
                     <artifactId>arquillian-container-spi</artifactId>
                  </exclusion>
               </exclusions>
            </dependency>
            <dependency>
               <groupId>org.eclipse.jetty</groupId>
               <artifactId>jetty-webapp</artifactId>
               <version>${version.jetty}</version>
               <scope>test</scope>
            </dependency>
            <dependency>
               <groupId>org.eclipse.jetty</groupId>
               <artifactId>jetty-plus</artifactId>
               <version>${version.jetty}</version>
               <scope>test</scope>
            </dependency>
            <dependency>
               <groupId>org.slf4j</groupId>
               <artifactId>slf4j-simple</artifactId>
               <version>1.5.10</version>
               <scope>test</scope>
            </dependency>
            <dependency>
               <groupId>org.slf4j</groupId>
               <artifactId>slf4j-log4j12</artifactId>
               <version>1.5.10</version>
               <scope>test</scope>
            </dependency>
            <dependency>
               <groupId>org.ocpsoft.logging</groupId>
               <artifactId>logging-adapter-slf4j</artifactId>
               <scope>test</scope>
            </dependency>

            <!-- Weld servlet, EL and JSP required for testing CDI injections -->
            <!-- Don't use 'org.jboss.weld.servlet:weld-servlet' as it has 
               an incompatible slf4j version shaded in -->
            <dependency>
               <groupId>org.jboss.weld.servlet</groupId>
               <artifactId>weld-servlet-core</artifactId>
               <version>1.1.4.Final</version>
               <scope>test</scope>
            </dependency>
            <dependency>
               <groupId>org.jboss.weld</groupId>
               <artifactId>weld-core</artifactId>
               <version>1.1.4.Final</version>
               <scope>test</scope>
            </dependency>

            <dependency>
               <groupId>javax.enterprise</groupId>
               <artifactId>cdi-api</artifactId>
               <scope>test</scope>
            </dependency>
            <dependency>
               <groupId>org.glassfish</groupId>
               <artifactId>javax.faces</artifactId>
               <version>2.1.7</version>
               <scope>test</scope>
            </dependency>
            <dependency>
               <groupId>org.glassfish.web</groupId>
               <artifactId>el-impl</artifactId>
               <version>2.2</version>
               <scope>test</scope>
            </dependency>
            <dependency>
               <groupId>javax.servlet.jsp</groupId>
               <artifactId>jsp-api</artifactId>
               <version>2.2</version>
               <scope>test</scope>
            </dependency>
         </dependencies>
      </profile>

      <profile>
         <id>JBOSS_AS_MANAGED_7.X</id>
         <build>
            <plugins>
               <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-surefire-plugin</artifactId>
                  <configuration>
                     <systemPropertyVariables>
                        <arquillian.launch>jbossas_managed</arquillian.launch>
                     </systemPropertyVariables>
                     <excludedGroups>
                        org.ocpsoft.rewrite.category.IgnoreForAS7
                     </excludedGroups>
                  </configuration>
               </plugin>
               <plugin>
                  <artifactId>maven-dependency-plugin</artifactId>
                  <extensions>false</extensions>
                  <executions>
                     <execution>
                        <id>unpack</id>
                        <phase>process-test-classes</phase>
                        <goals>
                           <goal>unpack</goal>
                        </goals>
                        <configuration>
                           <artifactItems>
                              <artifactItem>
                                 <groupId>org.jboss.as</groupId>
                                 <artifactId>jboss-as-dist</artifactId>
                                 <version>${version.jbossas}</version>
                                 <type>zip</type>
                                 <overWrite>false</overWrite>
                                 <outputDirectory>${project.build.directory}/container</outputDirectory>
                              </artifactItem>
                           </artifactItems>
                        </configuration>
                     </execution>
                  </executions>
               </plugin>
               <plugin>
                  <artifactId>maven-antrun-plugin</artifactId>
                  <version>1.7</version>
                  <executions>
                     <execution>
                        <phase>process-test-classes</phase>
                        <configuration>
                           <target>
                              <copy file="${user.dir}/test-harness/src/main/resources/jbossas-managed-standalone.xml" todir="${project.build.directory}/container/jboss-as-${version.jbossas}/standalone/configuration" />
                           </target>
                        </configuration>
                        <goals>
                           <goal>run</goal>
                        </goals>
                     </execution>
                  </executions>
               </plugin>
            </plugins>
         </build>
         <dependencies>
            <dependency>
               <groupId>org.jboss.spec</groupId>
               <artifactId>jboss-javaee-web-6.0</artifactId>
               <version>3.0.1.Final</version>
               <type>pom</type>
               <scope>test</scope>
            </dependency>
            <dependency>
               <groupId>org.jboss.as</groupId>
               <artifactId>jboss-as-arquillian-container-managed</artifactId>
               <version>${version.jbossas}</version>
               <scope>test</scope>
            </dependency>
         </dependencies>
      </profile>

      <profile>
         <id>JBOSS_AS_REMOTE_7.X</id>
         <build>
            <plugins>
               <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-surefire-plugin</artifactId>
                  <configuration>
                     <excludedGroups>
                        org.ocpsoft.rewrite.category.IgnoreForAS7
                     </excludedGroups>
                  </configuration>
               </plugin>
            </plugins>
         </build>
         <dependencies>
            <dependency>
               <groupId>org.jboss.spec</groupId>
               <artifactId>jboss-javaee-web-6.0</artifactId>
               <version>3.0.1.Final</version>
               <type>pom</type>
               <scope>test</scope>
            </dependency>
            <dependency>
               <groupId>org.jboss.as</groupId>
               <artifactId>jboss-as-arquillian-container-remote</artifactId>
               <version>${version.jbossas}</version>
               <scope>test</scope>
            </dependency>
         </dependencies>
      </profile>

      <profile>
         <id>GLASSFISH_MANAGED_3.1</id>
         <build>
            <plugins>
               <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-surefire-plugin</artifactId>
                  <configuration>
                     <systemProperties>
                        <arquillian.launch>glassfish3_managed</arquillian.launch>
                     </systemProperties>
                     <excludedGroups>
                        org.ocpsoft.rewrite.category.IgnoreForGlassfish3
                     </excludedGroups>
                  </configuration>
               </plugin>
               <plugin>
                  <artifactId>maven-antrun-plugin</artifactId>
                  <version>1.7</version>
                  <executions>
                     <execution>
                        <phase>generate-test-resources</phase>
                        <goals>
                           <goal>run</goal>
                        </goals>
                        <configuration>
                           <target>
                              <mkdir dir="${container.download.dir}" />
                              <get dest="${container.download.dir}" verbose="true" skipexisting="true" src="http://download.java.net/glassfish/${version.glassfish3}/release/glassfish-${version.glassfish3}-web.zip" />
                              <unzip src="${container.download.dir}/glassfish-${version.glassfish3}-web.zip" dest="${project.build.directory}/container" />
                              <!-- Change all TCP ports from "xxxx" to "3xxxx" -->
                              <replace file="${project.build.directory}/container/glassfish3/glassfish/domains/domain1/config/domain.xml" token="port=&quot;8080&quot;" value="port=&quot;38080&quot;" />
                              <replace file="${project.build.directory}/container/glassfish3/glassfish/domains/domain1/config/domain.xml" token="port=&quot;8181&quot;" value="port=&quot;38181&quot;" />
                              <replace file="${project.build.directory}/container/glassfish3/glassfish/domains/domain1/config/domain.xml" token="port=&quot;4848&quot;" value="port=&quot;34848&quot;" />
                              <replace file="${project.build.directory}/container/glassfish3/glassfish/domains/domain1/config/domain.xml" token="port=&quot;3700&quot;" value="port=&quot;33700&quot;" />
                              <replace file="${project.build.directory}/container/glassfish3/glassfish/domains/domain1/config/domain.xml" token="port=&quot;8686&quot;" value="port=&quot;38686&quot;" />
                              <replace file="${project.build.directory}/container/glassfish3/glassfish/domains/domain1/config/domain.xml" token="port=&quot;7676&quot;" value="port=&quot;37676&quot;" />
                           </target>
                        </configuration>
                     </execution>
                  </executions>
               </plugin>
            </plugins>
         </build>
         <dependencies>
            <dependency>
               <groupId>org.jboss.arquillian.container</groupId>
               <artifactId>arquillian-glassfish-managed-3.1</artifactId>
               <version>${version.arquillian.glassfish}</version>
               <scope>test</scope>
            </dependency>
            <dependency>
               <groupId>org.jboss.spec</groupId>
               <artifactId>jboss-javaee-6.0</artifactId>
               <version>${version.jboss.spec}</version>
               <type>pom</type>
               <scope>provided</scope>
            </dependency>
         </dependencies>
      </profile>

      <profile>
         <id>GLASSFISH_REMOTE_3.1</id>
         <build>
            <plugins>
               <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-surefire-plugin</artifactId>
                  <configuration>
                     <systemProperties>
                        <arquillian.launch>glassfish_remote</arquillian.launch>
                     </systemProperties>
                     <excludedGroups>
                        org.ocpsoft.rewrite.category.IgnoreForGlassfish3
                     </excludedGroups>
                  </configuration>
               </plugin>
            </plugins>
         </build>
         <dependencies>
            <dependency>
               <groupId>org.jboss.arquillian.container</groupId>
               <artifactId>arquillian-glassfish-remote-3.1</artifactId>
               <version>${version.arquillian.glassfish}</version>
               <scope>test</scope>
            </dependency>
            <dependency>
               <groupId>org.jboss.spec</groupId>
               <artifactId>jboss-javaee-6.0</artifactId>
               <version>${version.jboss.spec}</version>
               <type>pom</type>
               <scope>provided</scope>
            </dependency>
         </dependencies>
      </profile>

      <profile>
         <id>GLASSFISH_MANAGED_4.0</id>
         <build>
            <plugins>
               <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-surefire-plugin</artifactId>
                  <configuration>
                     <systemProperties>
                        <arquillian.launch>glassfish4_managed</arquillian.launch>
                     </systemProperties>
                     <excludedGroups>
                        org.ocpsoft.rewrite.category.IgnoreForGlassfish4
                     </excludedGroups>
                  </configuration>
               </plugin>
               <plugin>
                  <artifactId>maven-antrun-plugin</artifactId>
                  <version>1.7</version>
                  <executions>
                     <execution>
                        <phase>generate-test-resources</phase>
                        <goals>
                           <goal>run</goal>
                        </goals>
                        <configuration>
                           <target>
                              <mkdir dir="${container.download.dir}" />
                              <get dest="${container.download.dir}" verbose="true" skipexisting="true" src="http://download.java.net/glassfish/${version.glassfish4}/release/glassfish-${version.glassfish4}-web.zip" />
                              <unzip src="${container.download.dir}/glassfish-${version.glassfish4}-web.zip" dest="${project.build.directory}/container" />
                              <!-- Change all TCP ports from "xxxx" to "3xxxx" -->
                              <replace file="${project.build.directory}/container/glassfish4/glassfish/domains/domain1/config/domain.xml" token="port=&quot;3700&quot;" value="port=&quot;33700&quot;" />
                              <replace file="${project.build.directory}/container/glassfish4/glassfish/domains/domain1/config/domain.xml" token="port=&quot;8181&quot;" value="port=&quot;38181&quot;" />
                              <replace file="${project.build.directory}/container/glassfish4/glassfish/domains/domain1/config/domain.xml" token="port=&quot;8686&quot;" value="port=&quot;38686&quot;" />
                              <replace file="${project.build.directory}/container/glassfish4/glassfish/domains/domain1/config/domain.xml" token="port=&quot;4848&quot;" value="port=&quot;34848&quot;" />
                              <replace file="${project.build.directory}/container/glassfish4/glassfish/domains/domain1/config/domain.xml" token="port=&quot;8080&quot;" value="port=&quot;38080&quot;" />
                              <replace file="${project.build.directory}/container/glassfish4/glassfish/domains/domain1/config/domain.xml" token="value=&quot;7676&quot;" value="value=&quot;37676&quot;" />
                           </target>
                        </configuration>
                     </execution>
                  </executions>
               </plugin>
            </plugins>
         </build>
         <dependencies>
            <dependency>
               <groupId>org.jboss.arquillian.container</groupId>
               <artifactId>arquillian-glassfish-managed-3.1</artifactId>
               <version>${version.arquillian.glassfish}</version>
               <scope>test</scope>
            </dependency>
            <dependency>
               <groupId>org.jboss.spec</groupId>
               <artifactId>jboss-javaee-6.0</artifactId>
               <version>${version.jboss.spec}</version>
               <type>pom</type>
               <scope>provided</scope>
            </dependency>
         </dependencies>
      </profile>

      <profile>
         <id>GLASSFISH_REMOTE_4.0</id>
         <build>
            <plugins>
               <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-surefire-plugin</artifactId>
                  <configuration>
                     <systemProperties>
                        <arquillian.launch>glassfish_remote</arquillian.launch>
                     </systemProperties>
                     <excludedGroups>
                        org.ocpsoft.rewrite.category.IgnoreForGlassfish4
                     </excludedGroups>
                  </configuration>
               </plugin>
            </plugins>
         </build>
         <dependencies>
            <dependency>
               <groupId>org.jboss.arquillian.container</groupId>
               <artifactId>arquillian-glassfish-remote-3.1</artifactId>
               <version>${version.arquillian.glassfish}</version>
               <scope>test</scope>
            </dependency>
            <dependency>
               <groupId>org.jboss.spec</groupId>
               <artifactId>jboss-javaee-6.0</artifactId>
               <version>${version.jboss.spec}</version>
               <type>pom</type>
               <scope>provided</scope>
            </dependency>
         </dependencies>
      </profile>

      <profile>
         <id>TOMCAT_MANAGED_7_WELD</id>
         <build>
            <plugins>
               <plugin>
                  <artifactId>maven-antrun-plugin</artifactId>
                  <version>1.7</version>
                  <executions>
                     <execution>
                        <phase>generate-test-resources</phase>
                        <goals>
                           <goal>run</goal>
                        </goals>
                        <configuration>
                           <target>
                              <mkdir dir="${container.download.dir}" />
                              <get dest="${container.download.dir}" verbose="true" skipexisting="true" src="http://archive.apache.org/dist/tomcat/tomcat-7/v${version.tomcat}/bin/apache-tomcat-${version.tomcat}.zip" />
                              <unzip src="${container.download.dir}/apache-tomcat-${version.tomcat}.zip" dest="${project.build.directory}/container" />
                              <move file="${project.build.directory}/container/apache-tomcat-${version.tomcat}" tofile="${project.build.directory}/container/apache-tomcat-7" />
                              <!-- Change all TCP ports from "xxxx" to "3xxxx" -->
                              <replace file="${project.build.directory}/container/apache-tomcat-7/conf/server.xml" token="port=&quot;8005&quot;" value="port=&quot;38005&quot;" />
                              <replace file="${project.build.directory}/container/apache-tomcat-7/conf/server.xml" token="port=&quot;8080&quot;" value="port=&quot;38080&quot;" />
                              <replace file="${project.build.directory}/container/apache-tomcat-7/conf/server.xml" token="port=&quot;8009&quot;" value="port=&quot;38009&quot;" />
                              <!-- Authentication for Tomcat Manager -->
                              <echo file="${project.build.directory}/container/apache-tomcat-7/conf/tomcat-users.xml">
                                 <![CDATA[
                                 <?xml version="1.0" encoding="UTF-8"?>
                                 <tomcat-users>
                                    <role rolename="manager-script" />
                                    <user username="arquillian" password="arquillian" roles="manager-script" />
                                 </tomcat-users>
                                 ]]>
                              </echo>
                           </target>
                        </configuration>
                     </execution>
                  </executions>
               </plugin>
               <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-surefire-plugin</artifactId>
                  <configuration>
                     <systemProperties>
                        <arquillian.launch>tomcat_managed</arquillian.launch>
                        <rewrite.test.cdi>weld</rewrite.test.cdi>
                     </systemProperties>
                  </configuration>
               </plugin>
            </plugins>
         </build>
         <dependencies>
            <dependency>
               <groupId>org.jboss.arquillian.container</groupId>
               <artifactId>arquillian-tomcat-managed-7</artifactId>
               <version>${version.arquillian.tomcat}</version>
               <scope>test</scope>
            </dependency>
         </dependencies>
      </profile>

      <profile>
         <id>TOMCAT_MANAGED_7_OWB</id>
         <build>
            <plugins>
               <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-surefire-plugin</artifactId>
                  <configuration>
                     <systemProperties>
                        <arquillian.launch>tomcat_managed</arquillian.launch>
                        <rewrite.test.cdi>owb</rewrite.test.cdi>
                     </systemProperties>
                  </configuration>
               </plugin>
            </plugins>
         </build>
         <dependencies>
            <dependency>
               <groupId>org.jboss.arquillian.container</groupId>
               <artifactId>arquillian-tomcat-managed-7</artifactId>
               <version>${version.arquillian.tomcat}</version>
               <scope>test</scope>
            </dependency>
         </dependencies>
      </profile>

      <profile>
         <id>TOMEE_MANAGED_1.5</id>
         <dependencies>
            <dependency>
               <groupId>org.apache.openejb</groupId>
               <artifactId>tomee-embedded</artifactId>
               <version>1.5.2</version>
               <scope>test</scope>
            </dependency>
            <dependency>
               <groupId>org.apache.openejb</groupId>
               <artifactId>arquillian-tomee-remote</artifactId>
               <version>1.5.2</version>
               <scope>test</scope>
            </dependency>
         </dependencies>
      </profile>

      <profile>
         <id>WILDFLY_REMOTE_8</id>
         <build>
            <plugins>
               <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-surefire-plugin</artifactId>
                  <configuration>
                     <excludedGroups>
                        org.ocpsoft.rewrite.category.IgnoreForWildfly
                     </excludedGroups>
                  </configuration>
               </plugin>
            </plugins>
         </build>
         <dependencies>
            <dependency>
               <groupId>org.wildfly</groupId>
               <artifactId>wildfly-arquillian-container-remote</artifactId>
               <version>${version.wildfly}</version>
               <scope>test</scope>
            </dependency>
         </dependencies>
      </profile>

      <profile>
         <id>WILDFLY_MANAGED_8</id>
         <build>
            <plugins>
               <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-surefire-plugin</artifactId>
                  <configuration>
                     <systemPropertyVariables>
                        <arquillian.launch>wildfly_managed</arquillian.launch>
                     </systemPropertyVariables>
                     <excludedGroups>
                        org.ocpsoft.rewrite.category.IgnoreForWildfly
                     </excludedGroups>
                  </configuration>
               </plugin>
               <plugin>
                  <artifactId>maven-dependency-plugin</artifactId>
                  <extensions>false</extensions>
                  <executions>
                     <execution>
                        <id>unpack-wildfly</id>
                        <phase>process-test-classes</phase>
                        <goals>
                           <goal>unpack</goal>
                        </goals>
                        <configuration>
                           <artifactItems>
                              <artifactItem>
                                 <groupId>org.wildfly</groupId>
                                 <artifactId>wildfly-dist</artifactId>
                                 <version>${version.wildfly}</version>
                                 <type>zip</type>
                                 <overWrite>false</overWrite>
                                 <outputDirectory>${project.build.directory}/container</outputDirectory>
                              </artifactItem>
                           </artifactItems>
                        </configuration>
                     </execution>
                  </executions>
               </plugin>
            </plugins>
         </build>
         <dependencies>
            <dependency>
               <groupId>org.wildfly</groupId>
               <artifactId>wildfly-arquillian-container-managed</artifactId>
               <version>${version.wildfly}</version>
               <scope>test</scope>
            </dependency>
         </dependencies>
      </profile>

   </profiles>

   <developers>
      <developer>
         <id>lincolnbaxter</id>
         <name>Lincoln Baxter, III</name>
         <email>lincoln@ocpsoft.org</email>
         <timezone>-5</timezone>
      </developer>
      <developer>
         <id>chkalt</id>
         <name>Christian Kaltepoth</name>
         <email>christian@kaltepoth.de</email>
         <url>http://chkal.blogspot.com/</url>
         <timezone>+1</timezone>
      </developer>
   </developers>

   <url>http://ocpsoft.org/rewrite/</url>

   <licenses>
      <license>
         <name>Apache License</name>
         <url>http://www.apache.org/licenses/</url>
         <distribution>repo</distribution>
      </license>
   </licenses>

   <scm>
      <connection>scm:git:git://github.com/ocpsoft/rewrite.git</connection>
      <developerConnection>scm:git:git@github.com:ocpsoft/rewrite.git</developerConnection>
      <url>http://github.com/ocpsoft/rewrite</url>
      <tag>2.0.12.Final</tag>
   </scm>

   <issueManagement>
      <system>GitHub</system>
      <url>https://github.com/ocpsoft/rewrite/issues</url>
   </issueManagement>

</project>
