<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright 2016 Red Hat Inc. and/or its affiliates and other contributors.
-
- 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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.jboss.integration.fuse</groupId>
        <artifactId>eap-release-parent</artifactId>
        <version>1.7.0.redhat-630028</version>
    </parent>
    <artifactId>fuse-integration-eap-itests</artifactId>
    <packaging>jar</packaging>
    <name>Fuse Integration: AS7 Release Distribution Tests</name>
    <description>Fuse BXMS Integration AS7 Release Distribution Tests</description>
    <properties>
        <temp.switchyard.unpack>${project.build.directory}/temp/switchyard-distro</temp.switchyard.unpack>
        <temp.fuse.integration.unpack>${project.build.directory}/temp/fuse-integration</temp.fuse.integration.unpack>
    </properties>
    <dependencyManagement>
        <dependencies>
            <!-- We want to align with EAP deps, since that's what users will likely use when deploying 
                to EAP. -->
            <dependency>
                <groupId>org.jboss.integration-platform</groupId>
                <artifactId>jboss-integration-platform-bom</artifactId>
                <version>${version.org.jboss.integration-platform}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <!-- EAP tests need to use CXF 2.7.x, which is the one used by EAP 6.4.x. Following artifacts 
                are not in the above jboss-integration-platform-bom, so need to be overridden directly here. -->
            <dependency>
                <groupId>org.apache.cxf</groupId>
                <artifactId>cxf-rt-bindings-coloc</artifactId>
                <version>${version.org.apache.cxf}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.cxf</groupId>
                <artifactId>cxf-rt-bindings-object</artifactId>
                <version>${version.org.apache.cxf}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.cxf</groupId>
                <artifactId>cxf-rt-transports-local</artifactId>
                <version>${version.org.apache.cxf}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.cxf</groupId>
                <artifactId>cxf-rt-transports-jms</artifactId>
                <version>${version.org.apache.cxf}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.cxf</groupId>
                <artifactId>cxf-rt-ws-mex</artifactId>
                <version>${version.org.apache.cxf}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.cxf</groupId>
                <artifactId>cxf-rt-ws-rm</artifactId>
                <version>${version.org.apache.cxf}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.cxf</groupId>
                <artifactId>cxf-tools-java2ws</artifactId>
                <version>${version.org.apache.cxf}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.cxf</groupId>
                <artifactId>cxf-tools-wsdlto-core</artifactId>
                <version>${version.org.apache.cxf}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.cxf</groupId>
                <artifactId>cxf-tools-wsdlto-databinding-jaxb</artifactId>
                <version>${version.org.apache.cxf}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.cxf</groupId>
                <artifactId>cxf-tools-wsdlto-frontend-jaxws</artifactId>
                <version>${version.org.apache.cxf}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.cxf</groupId>
                <artifactId>cxf-rt-management</artifactId>
                <version>${version.org.apache.cxf}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.cxf</groupId>
                <artifactId>cxf-tools-common</artifactId>
                <version>${version.org.apache.cxf}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.cxf</groupId>
                <artifactId>cxf-rt-databinding-aegis</artifactId>
                <version>${version.org.apache.cxf}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.cxf</groupId>
                <artifactId>cxf-tools-validator</artifactId>
                <version>${version.org.apache.cxf}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.cxf.services.sts</groupId>
                <artifactId>cxf-services-sts-core</artifactId>
                <version>${version.org.apache.cxf}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.cxf.services.ws-discovery</groupId>
                <artifactId>cxf-services-ws-discovery-api</artifactId>
                <version>${version.org.apache.cxf}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.switchyard</groupId>
            <artifactId>switchyard-test</artifactId>
        </dependency>
        <dependency>
            <groupId>org.switchyard</groupId>
            <artifactId>switchyard-remote</artifactId>
        </dependency>
        <dependency>
            <groupId>org.switchyard.components</groupId>
            <artifactId>switchyard-component-bean</artifactId>
        </dependency>
        <dependency>
            <groupId>org.switchyard.components</groupId>
            <artifactId>switchyard-component-jca</artifactId>
        </dependency>
        <dependency>
            <groupId>org.switchyard.components</groupId>
            <artifactId>switchyard-component-soap</artifactId>
        </dependency>
        <dependency>
            <groupId>org.switchyard.components</groupId>
            <artifactId>switchyard-component-test-mixin-hornetq</artifactId>
        </dependency>
        <dependency>
            <groupId>org.switchyard.components</groupId>
            <artifactId>switchyard-component-test-mixin-http</artifactId>
        </dependency>
        <dependency>
            <groupId>org.switchyard</groupId>
            <artifactId>switchyard-release-testutil</artifactId>
        </dependency>
        <!-- Test Dependencies -->
        <dependency>
            <groupId>org.jboss.integration.fuse</groupId>
            <artifactId>fuse-integration-eap-installer</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.integration.fuse.quickstarts</groupId>
            <artifactId>switchyard-rules-csv</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.arquillian.junit</groupId>
            <artifactId>arquillian-junit-container</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.arquillian.container</groupId>
            <artifactId>arquillian-container-test-api</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.as</groupId>
            <artifactId>jboss-as-arquillian-container-managed</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.as</groupId>
            <artifactId>jboss-as-arquillian-common</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.as</groupId>
            <artifactId>jboss-as-arquillian-testenricher-msc</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.as</groupId>
            <artifactId>jboss-as-arquillian-protocol-jmx</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.shrinkwrap.descriptors</groupId>
            <artifactId>shrinkwrap-descriptors-impl-javaee</artifactId>
            <scope>test</scope>
        </dependency>
        <!-- CXF client dependencies -->
        <dependency>
            <groupId>org.jboss.ws.cxf</groupId>
            <artifactId>jbossws-cxf-client</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.ws.cxf</groupId>
            <artifactId>jbossws-cxf-factories</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.ws.cxf</groupId>
            <artifactId>jbossws-cxf-transports-httpserver</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-frontend-simple</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-frontend-jaxws</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-bindings-soap</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-bindings-xml</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-databinding-jaxb</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-hl7</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-mina2</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.picketlink</groupId>
            <artifactId>picketlink-federation</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.sshd</groupId>
            <artifactId>sshd-sftp</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <profiles>
        <profile>
            <id>default</id>
            <activation>
                <property>
                    <name>!eap.home</name>
                </property>
            </activation>
            <properties>
                <eap.home>${project.build.directory}/jboss-eap-6.4</eap.home>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-dependency-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>unpack-wildfly</id>
                                <phase>generate-resources</phase>
                                <goals>
                                    <goal>unpack</goal>
                                </goals>
                                <configuration>
                                    <artifactItems>
                                        <artifactItem>
                                            <groupId>org.jboss.as</groupId>
                                            <artifactId>jboss-as-dist</artifactId>
                                            <version>${version.eap}</version>
                                            <type>zip</type>
                                            <overWrite>false</overWrite>
                                            <outputDirectory>${project.build.directory}</outputDirectory>
                                        </artifactItem>
                                    </artifactItems>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
            <repositories>
                <!-- Needed to download latest org.jboss.as:jboss-as-dist:zip (aka EAP zip) -->
                <repository>
                    <id>jboss-eap-prod-repository</id>
                    <url>http://download.eng.bos.redhat.com/brewroot/repos/jb-eap-6.4-rhel-6-build/latest/maven</url>
                </repository>
            </repositories>
        </profile>
    </profiles>
    <build>
        <testResources>
            <testResource>
                <directory>src/test/resources</directory>
                <filtering>true</filtering>
            </testResource>
        </testResources>
        <plugins>
            <plugin>
                <groupId>org.jboss.shrinkwrap.resolver</groupId>
                <artifactId>shrinkwrap-resolver-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>propagate-execution-context</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-eap-installer</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>com.redhat.fuse.eap</groupId>
                                    <artifactId>fuse-eap-installer</artifactId>
                                    <version>${version.fuse.eap}</version>
                                    <outputDirectory>${eap.home}</outputDirectory>
                                    <destFileName>fuse-eap-installer.jar</destFileName>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.jboss.integration.fuse</groupId>
                                    <artifactId>fuse-integration-eap-installer</artifactId>
                                    <version>${project.version}</version>
                                    <outputDirectory>${eap.home}</outputDirectory>
                                    <destFileName>fuse-integration-eap-installer.jar</destFileName>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.kie</groupId>
                                    <artifactId>kie-eap-installer</artifactId>
                                    <version>${version.org.kie}</version>
                                    <outputDirectory>${eap.home}</outputDirectory>
                                    <destFileName>kie-eap-installer.jar</destFileName>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>install-fuse-eap</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>exec</goal>
                        </goals>
                        <configuration>
                            <executable>java</executable>
                            <arguments>
                                <argument>-jar</argument>
                                <argument>${eap.home}/fuse-eap-installer.jar</argument>
                                <argument>${eap.home}</argument>
                            </arguments>
                        </configuration>
                    </execution>
                    <execution>
                        <id>install-kie</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>exec</goal>
                        </goals>
                        <configuration>
                            <executable>java</executable>
                            <arguments>
                                <argument>-jar</argument>
                                <argument>${eap.home}/kie-eap-installer.jar</argument>
                                <argument>${eap.home}</argument>
                            </arguments>
                        </configuration>
                    </execution>
                    <execution>
                        <id>install-fuse-integration</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>exec</goal>
                        </goals>
                        <configuration>
                            <executable>java</executable>
                            <arguments>
                                <argument>-jar</argument>
                                <argument>${eap.home}/fuse-integration-eap-installer.jar</argument>
                                <argument>${eap.home}</argument>
                            </arguments>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <!-- Configure the Surefire plugin for running the tests. Be sure to make these same setting 
                if running in your IDE... -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <argLine>-Xms512m -Xmx512m</argLine>
                    <environmentVariables>
                        <JBOSS_HOME>${eap.home}</JBOSS_HOME>
                        <SWITCHYARD_VERSION>${project.version}</SWITCHYARD_VERSION>
                    </environmentVariables>
                    <systemProperties>
                        <property>
                            <name>jboss.options</name>
                            <value>-Xmx1024m -XX:MaxPermSize=512m</value>
                        </property>
                    </systemProperties>
                    <trimStackTrace>false</trimStackTrace>
                    <printSummary>true</printSummary>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
