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

<!-- ====================================================================== -->
<!--                                                                        -->
<!-- JBoss, the OpenSource J2EE webOS                                       -->
<!--                                                                        -->
<!-- Distributable under LGPL license.                                      -->
<!-- See terms of license at http://www.gnu.org.                            -->
<!--                                                                        -->
<!-- ====================================================================== -->

<!--
    Set these VM properties in your IDE debugger

    -Dtest.archive.directory=${workspace_loc:jbosgi-testsuite-functional/target}/test-libs
-->

<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.osgi.testsuite</groupId>
        <artifactId>jbosgi-testsuite</artifactId>
        <version>2.1.0</version>
    </parent>
    
    <name>JBossOSGi Testsuite Functional</name>
    
    <artifactId>jbosgi-testsuite-functional</artifactId>
    <packaging>jar</packaging>

    <!-- Properties -->
    <properties>
        <project.root.dir>${basedir}/../..</project.root.dir>
    </properties>
    
    <!-- Dependencies -->
    <dependencies>
        <dependency>
            <groupId>org.jboss.osgi.testsuite</groupId>
            <artifactId>jbosgi-testsuite-example</artifactId>
            <version>${project.version}</version>
        </dependency>

        <!-- Test -->
        <dependency>
            <groupId>org.jboss.osgi.testing</groupId>
            <artifactId>jbosgi-testing</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <executions>
                    <execution>
                        <id>bundles</id>
                        <phase>test-compile</phase>
                        <goals>
                            <goal>directory-single</goal>
                        </goals>
                        <configuration>
                            <finalName>test-libs</finalName>
                            <ignoreDirFormatExtensions>true</ignoreDirFormatExtensions>
                            <appendAssemblyId>false</appendAssemblyId>
                            <descriptors>
                                <descriptor>scripts/assembly-bundles.xml</descriptor>
                            </descriptors>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <!-- Profiles -->
    <profiles>
        <profile>
            <id>embedded-testing</id>
            <activation>
                <property>
                    <name>!target.container</name>
                </property>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>org.jboss.osgi.framework</groupId>
                    <artifactId>jbosgi-framework-core</artifactId>
                    <scope>test</scope>
                </dependency>
            </dependencies>
        </profile>

        <profile>
            <id>wildfly800-testing</id>
            <activation>
                <property>
                    <name>target.container</name>
                    <value>wildfly800</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <argLine>${surefire.system.args} ${surefire.security.args}</argLine>
                            <excludes>
                                <!-- [JBOSGI-639] Bundle update fails in AS8 -->
                                <exclude>**/*BundleUpdateTestCase.java</exclude>
                            </excludes>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
