<!--
  ~ Copyright 2013 Agorava
  ~
  ~ 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>
    <parent>
        <artifactId>agorava-linkedin-parent</artifactId>
        <groupId>org.agorava</groupId>
        <version>0.6.0</version>
    </parent>
    <artifactId>agorava-linkedin-cdi</artifactId>

    <dependencies>
        <dependency>
            <groupId>javax.enterprise</groupId>
            <artifactId>cdi-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.agorava</groupId>
            <artifactId>agorava-linkedin-api</artifactId>
        </dependency>

        <dependency>
            <groupId>org.agorava</groupId>
            <artifactId>agorava-core-impl-cdi</artifactId>
        </dependency>

        <dependency>
            <groupId>org.jboss.arquillian.junit</groupId>
            <artifactId>arquillian-junit-container</artifactId>
            <scope>test</scope>
        </dependency>

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

    <profiles>
        <profile>
            <id>weld</id>
            <activation>
                <activeByDefault>true</activeByDefault>
                <property>
                    <name>arquillian</name>
                    <value>weld-ee-embedded-1.1</value>
                </property>
            </activation>

            <properties>
                <arquillian>weld-ee-embedded-1.1</arquillian>
            </properties>
            <dependencies>
                <dependency>
                    <groupId>org.jboss.spec</groupId>
                    <artifactId>jboss-javaee-6.0</artifactId>
                    <type>pom</type>
                </dependency>

                <dependency>
                    <groupId>org.jboss.arquillian.container</groupId>
                    <artifactId>arquillian-weld-ee-embedded-1.1</artifactId>
                </dependency>
                <dependency>
                    <groupId>org.jboss.weld</groupId>
                    <artifactId>weld-core</artifactId>
                    <scope>test</scope>
                </dependency>
                <dependency>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-simple</artifactId>
                    <scope>test</scope>
                </dependency>
            </dependencies>

        </profile>

    </profiles>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${maven-surefire-plugin.version}</version>
                <configuration>
                    <skip>true</skip>
                    <systemPropertyVariables>
                        <arquillian.launch>${arquillian}</arquillian.launch>
                        <arquillian>${arquillian}</arquillian>
                    </systemPropertyVariables>
                </configuration>

                <executions>
                    <execution>
                        <id>surefire-it</id>
                        <phase>integration-test</phase>
                        <goals>
                            <goal>test</goal>
                        </goals>
                        <configuration>
                            <skip>false</skip>
                            <redirectTestOutputToFile>true</redirectTestOutputToFile>
                            <trimStackTrace>false</trimStackTrace>
                            <printSummary>true</printSummary>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
