<!--
  #%L
  Gravia :: Integration Tests :: Karaf
  %%
  Copyright (C) 2010 - 2014 JBoss by Red Hat
  %%
  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.
  #L%
  -->
  
<!--
    Set these VM properties in your IDE debugger
     
    -Dlog4j.configuration=file://${workspace_loc:gravia-itests-embedded}/src/test/resources/logging.properties
    -Dtarget.container=embedded
-->
<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.jboss.gravia</groupId>
        <artifactId>gravia-itests</artifactId>
        <version>1.2.0</version>
    </parent>

    <artifactId>gravia-itests-embedded</artifactId>
    
    <name>Gravia :: Integration Tests :: Embedded</name>
    
    <!-- Properties -->
    <properties>
    </properties>
    
    <dependencies>
        
        <!-- Provided Dependencies -->
        <dependency>
            <groupId>org.jboss.gravia</groupId>
            <artifactId>gravia-arquillian-container-embedded</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
	        <groupId>org.jboss.gravia</groupId>
	        <artifactId>gravia-itests-common</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.gravia</groupId>
            <artifactId>gravia-provision</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.gravia</groupId>
            <artifactId>gravia-runtime-embedded</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.http.bundle</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- Test Dependencies -->
        <dependency>
            <groupId>org.jboss.arquillian.junit</groupId>
            <artifactId>arquillian-junit-container</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

	<build>
        <testResources>
            <testResource>
                <directory>src/test/resources</directory>
                <filtering>true</filtering>
            </testResource>
        </testResources>
		<plugins>
            <plugin>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>process-test-resources</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>target/modules</outputDirectory>
                            <stripVersion>true</stripVersion>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>org.apache.felix</groupId>
                                    <artifactId>org.apache.felix.http.bundle</artifactId>
                                    <version>${project.apache.http}</version>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.jboss.gravia</groupId>
                                    <artifactId>gravia-provision</artifactId>
                                    <version>${project.version}</version>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.jboss.gravia</groupId>
                                    <artifactId>gravia-resolver</artifactId>
                                    <version>${project.version}</version>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.jboss.gravia</groupId>
                                    <artifactId>gravia-repository</artifactId>
                                    <version>${project.version}</version>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <argLine>${surefire.system.args}</argLine>
                    <redirectTestOutputToFile>false</redirectTestOutputToFile>
                    <reportNameSuffix>embedded</reportNameSuffix>
                    <systemPropertyVariables>
                        <log4j.configuration>file://${basedir}/src/test/resources/logging.properties</log4j.configuration>
                        <target.container>embedded</target.container>
                    </systemPropertyVariables>
                </configuration>
            </plugin>
		</plugins>
	</build>
    
</project>
