<?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/xsd/maven-4.0.0.xsd">
    <parent>
        <artifactId>org.wso2.carbon.tools</artifactId>
        <groupId>org.wso2.carbon</groupId>
        <version>5.2.8</version>
    </parent>

    <modelVersion>4.0.0</modelVersion>
    <artifactId>org.wso2.carbon.tools.core</artifactId>
    <packaging>jar</packaging>
    <name>WSO2 Carbon Kernel - Tools - Core</name>
    <description>The core of the standalone tools to be used alongside the WSO2 Carbon Kernel</description>
    <url>http://wso2.com</url>

    <dependencies>
        <dependency>
            <groupId>org.wso2.carbon</groupId>
            <artifactId>org.wso2.carbon.launcher</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon.utils</groupId>
            <artifactId>org.wso2.carbon.utils</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon</groupId>
            <artifactId>org.wso2.carbon.core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon</groupId>
            <artifactId>tool-test-artifact</artifactId>
            <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>org.testng</groupId>
            <artifactId>testng</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.easymock</groupId>
            <artifactId>easymock</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.powermock</groupId>
            <artifactId>powermock-api-easymock</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.powermock</groupId>
            <artifactId>powermock-module-testng</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifest>
                            <addClasspath>true</addClasspath>
                            <mainClass>org.wso2.carbon.tools.CarbonToolExecutor</mainClass>
                        </manifest>
                    </archive>
                    <finalName>${project.artifactId}.${project.version}</finalName>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
            </plugin>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <inherited>false</inherited>
                <configuration>
                    <suiteXmlFiles>
                        <suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile>
                    </suiteXmlFiles>
                    <systemProperties>
                        <carbon.kernel.version>${carbon.kernel.version}</carbon.kernel.version>
                        <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>
                        <target.directory>${project.build.directory}</target.directory>
                    </systemProperties>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy</id>
                        <phase>generate-test-resources</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>org.wso2.carbon</groupId>
                                    <artifactId>tool-test-artifact</artifactId>
                                    <type>jar</type>
                                    <outputDirectory>${project.build.directory}/test-resources/converter
                                    </outputDirectory>
                                    <destFileName>tool-test-artifact-${carbon.kernel.version}.jar</destFileName>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.wso2.eclipse.osgi</groupId>
                                    <artifactId>org.eclipse.osgi</artifactId>
                                    <version>${equinox.osgi.version}</version>
                                    <type>jar</type>
                                    <outputDirectory>${project.build.directory}/test-resources/converter
                                    </outputDirectory>
                                    <destFileName>org.eclipse.osgi_${equinox.osgi.version}.jar</destFileName>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.wso2.carbon</groupId>
                                    <artifactId>tool-test-artifact</artifactId>
                                    <type>jar</type>
                                    <outputDirectory>${project.build.directory}/test-resources/lib</outputDirectory>
                                    <destFileName>tool-test-artifact-${carbon.kernel.version}.jar</destFileName>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.wso2.eclipse.osgi</groupId>
                                    <artifactId>org.eclipse.osgi</artifactId>
                                    <version>${equinox.osgi.version}</version>
                                    <type>jar</type>
                                    <outputDirectory>${project.build.directory}/test-resources/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>${project.build.directory}/test-resources/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>${project.build.directory}/test-resources/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>${project.build.directory}/test-resources/lib</outputDirectory>
                                    <destFileName>org.eclipse.equinox.launcher_${equinox.launcher.version}.jar
                                    </destFileName>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>