<!--
 ~ Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
 ~
 ~ WSO2 Inc. licenses this file to you 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">

    <parent>
        <groupId>org.jaggeryjs</groupId>
        <artifactId>jaggery-parent</artifactId>
        <version>0.9.0.ALPHA4.wso2v4</version>
        <relativePath>../../pom.xml</relativePath>
    </parent>

    <modelVersion>4.0.0</modelVersion>
    <artifactId>integration</artifactId>
    <packaging>jar</packaging>
    <name>Jaggery Integration Tests</name>
    <url>http://wso2.org/projects/jaggery</url>
    <description>Jaggery Integration Tests</description>

    <licenses>
        <license>
            <name>Apache License Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0</url>
        </license>
    </licenses>

    <dependencies>
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <version>6.1.1</version>
        </dependency>
        <dependency>
            <groupId>xmlunit</groupId>
            <artifactId>xmlunit</artifactId>
            <version>${xmlunit.version}</version>
        </dependency>
        <dependency>
            <groupId>emma</groupId>
            <artifactId>emma</artifactId>
            <version>${emma.version}</version>
        </dependency>
        <dependency>
            <groupId>org.skyscreamer</groupId>
            <artifactId>jsonassert</artifactId>
            <version>${jsonassert.version}</version>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon</groupId>
            <artifactId>org.wso2.carbon.integration.core</artifactId>
            <version>${patch.version.403}</version>
            <classifier>tests</classifier>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>javax.servlet</groupId>
                    <artifactId>servlet-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon</groupId>
            <artifactId>org.wso2.carbon.integration.framework</artifactId>
            <version>${patch.version.403}</version>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon</groupId>
            <artifactId>SecVerifier</artifactId>
            <version>${patch.version.403}</version>
            <type>aar</type>
        </dependency>
        <dependency>
            <groupId>com.icegreen</groupId>
            <artifactId>greenmail</artifactId>
            <version>1.3.1b</version>
        </dependency>
    </dependencies>

    <profiles>
        <!--<profile>
            <id>core</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <version>${maven-surefire-plugin.version}</version>
                        <inherited>false</inherited>
                        <configuration>
                            <includes>
                                <include>**/*TestServerManager.java</include>
                                <include>**/core/*TestCase.java</include>
                            </includes>
                            <systemProperties>
                                <maven.test.haltafterfailure>false</maven.test.haltafterfailure>
                                <carbon.zip>
                                    ${basedir}/../../server/distribution/target/jaggery-${project.version}.zip
                                </carbon.zip>
                                <https.port>9443</https.port>
                                <http.port>9763</http.port>
                                <samples.dir>${basedir}/src/test/resources</samples.dir>
                                <extracted.dir>jaggery-${project.version}</extracted.dir>
                                <sec.verifier.dir>${basedir}/target/security-verifier/</sec.verifier.dir>
                                &lt;!&ndash;
                                <emma.home>${basedir}/target/emma</emma.home>
                                <emma.output>${basedir}/target/emma</emma.output>
                                &ndash;&gt;
                            </systemProperties>
                            <workingDirectory>${basedir}/target</workingDirectory>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-jar-plugin</artifactId>
                        <version>${maven-jar-plugin.version}</version>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>test-jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <artifactId>maven-clean-plugin</artifactId>
                        <version>${maven-clean-plugin.version}</version>
                        <executions>
                            <execution>
                                <id>auto-clean</id>
                                <phase>initialize</phase>
                                <goals>
                                    <goal>clean</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <artifactId>maven-dependency-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>copy-secVerifier</id>
                                <phase>compile</phase>
                                <goals>
                                    <goal>copy-dependencies</goal>
                                </goals>
                                <configuration>
                                    <outputDirectory>${basedir}/target/security-verifier</outputDirectory>
                                    <includeTypes>aar</includeTypes>
                                    <includeArtifactIds>SecVerifier</includeArtifactIds>
                                    <stripVersion>true</stripVersion>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>

                </plugins>
            </build>
        </profile>-->
        <profile>
            <id>community</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <version>${maven-surefire-plugin.version}</version>
                        <inherited>false</inherited>
                        <configuration>
                            <includes>
                                <include>**/*TestServerManager.java</include>
                                <include>**/core/*TestCase.java</include>
                                <include>**/community/*TestCase.java</include>
                            </includes>
                            <systemProperties>
                                <maven.test.haltafterfailure>false</maven.test.haltafterfailure>
                                <carbon.zip>
                                    ${basedir}/../../server/distribution/target/jaggery-${project.version}.zip
                                </carbon.zip>
                                <https.port>9443</https.port>
                                <http.port>9763</http.port>
                                <samples.dir>${basedir}/src/test/resources</samples.dir>
                                <extracted.dir>jaggery-${project.version}</extracted.dir>
                                <sec.verifier.dir>${basedir}/target/security-verifier/</sec.verifier.dir>
                                <!--
                                <emma.home>${basedir}/target/emma</emma.home>
                                <emma.output>${basedir}/target/emma</emma.output>
                                -->
                            </systemProperties>
                            <workingDirectory>${basedir}/target</workingDirectory>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-jar-plugin</artifactId>
                        <version>${maven-jar-plugin.version}</version>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>test-jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <artifactId>maven-clean-plugin</artifactId>
                        <version>${maven-clean-plugin.version}</version>
                        <executions>
                            <execution>
                                <id>auto-clean</id>
                                <phase>initialize</phase>
                                <goals>
                                    <goal>clean</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <artifactId>maven-dependency-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>copy-secVerifier</id>
                                <phase>compile</phase>
                                <goals>
                                    <goal>copy-dependencies</goal>
                                </goals>
                                <configuration>
                                    <outputDirectory>${basedir}/target/security-verifier</outputDirectory>
                                    <includeTypes>aar</includeTypes>
                                    <includeArtifactIds>SecVerifier</includeArtifactIds>
                                    <stripVersion>true</stripVersion>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>

                </plugins>
            </build>
        </profile>
    </profiles>

</project>
