<?xml version="1.0" encoding="utf-8"?>
<!--
 Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.

 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.wso2.carbon</groupId>
        <artifactId>carbon-kernel-parent</artifactId>
        <version>5.2.8</version>
        <relativePath>../parent/pom.xml</relativePath>
    </parent>

    <artifactId>org.wso2.carbon.launcher</artifactId>
    <packaging>jar</packaging>
    <name>WSO2 Carbon Kernel - Launcher</name>
    <description>The main module which launches a carbon instance</description>
    <url>http://wso2.com</url>

    <dependencies>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.ops4j.pax.logging</groupId>
            <artifactId>pax-logging-api</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jacoco</groupId>
            <artifactId>org.jacoco.agent</artifactId>
            <classifier>runtime</classifier>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.wso2.eclipse.osgi</groupId>
            <artifactId>org.eclipse.osgi</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.wso2.eclipse.equinox</groupId>
            <artifactId>org.eclipse.equinox.simpleconfigurator</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.wso2.eclipse.equinox</groupId>
            <artifactId>org.eclipse.equinox.util</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.wso2.eclipse.equinox</groupId>
            <artifactId>org.eclipse.equinox.launcher</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>commons-io.wso2</groupId>
            <artifactId>commons-io</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <configuration>
                        <systemPropertyVariables>
                            <java.util.logging.config.file>
                                ${basedir}/src/test/resources/logging/logging.properties
                            </java.util.logging.config.file>
                        </systemPropertyVariables>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <systemProperties>
                        <equinox.osgi.version>${equinox.osgi.version}</equinox.osgi.version>
                        <equinox.simpleconfigurator.version>${equinox.simpleconfigurator.version}
                        </equinox.simpleconfigurator.version>
                        <equinox.util.version>${equinox.util.version}</equinox.util.version>
                        <equinox.launcher.version>${equinox.launcher.version}</equinox.launcher.version>
                    </systemProperties>
                    <suiteXmlFiles>
                        <suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile>
                    </suiteXmlFiles>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
            </plugin>
            <plugin>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-plugins</id>
                        <phase>test-compile</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>org.wso2.eclipse.osgi</groupId>
                                    <artifactId>org.eclipse.osgi</artifactId>
                                    <version>${equinox.osgi.version}</version>
                                    <type>jar</type>
                                    <outputDirectory>${basedir}/target/carbon-home/wso2/lib/plugins</outputDirectory>
                                    <destFileName>org.eclipse.osgi_${equinox.osgi.version}.jar</destFileName>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.wso2.eclipse.equinox</groupId>
                                    <artifactId>org.eclipse.equinox.simpleconfigurator</artifactId>
                                    <version>${equinox.simpleconfigurator.version}</version>
                                    <type>jar</type>
                                    <outputDirectory>${basedir}/target/carbon-home/wso2/lib/plugins</outputDirectory>
                                    <destFileName>
                                        org.eclipse.equinox.simpleconfigurator_${equinox.simpleconfigurator.version}.jar
                                    </destFileName>
                                </artifactItem>
                                <!-- artifacts for OSGi-lib tests -->
                                <artifactItem>
                                    <groupId>org.wso2.eclipse.osgi</groupId>
                                    <artifactId>org.eclipse.osgi</artifactId>
                                    <version>${equinox.osgi.version}</version>
                                    <type>jar</type>
                                    <outputDirectory>${basedir}/target/carbon-home/lib
                                    </outputDirectory>
                                    <destFileName>org.eclipse.osgi_${equinox.osgi.version}.jar</destFileName>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.wso2.eclipse.equinox</groupId>
                                    <artifactId>org.eclipse.equinox.simpleconfigurator</artifactId>
                                    <version>${equinox.simpleconfigurator.version}</version>
                                    <type>jar</type>
                                    <outputDirectory>${basedir}/target/carbon-home/lib
                                    </outputDirectory>
                                    <destFileName>
                                        org.eclipse.equinox.simpleconfigurator_${equinox.simpleconfigurator.version}.jar
                                    </destFileName>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.wso2.eclipse.equinox</groupId>
                                    <artifactId>org.eclipse.equinox.util</artifactId>
                                    <version>${equinox.util.version}</version>
                                    <type>jar</type>
                                    <outputDirectory>${basedir}/target/carbon-home/lib
                                    </outputDirectory>
                                    <destFileName>org.eclipse.equinox.util_${equinox.util.version}.jar</destFileName>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.wso2.eclipse.equinox</groupId>
                                    <artifactId>org.eclipse.equinox.launcher</artifactId>
                                    <version>${equinox.launcher.version}</version>
                                    <type>jar</type>
                                    <outputDirectory>${basedir}/target/carbon-home/lib
                                    </outputDirectory>
                                    <destFileName>org.eclipse.equinox.launcher_${equinox.launcher.version}.jar
                                    </destFileName>
                                </artifactItem>
                                <!-- artifacts for OSGi-lib tests -->
                            </artifactItems>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
