<!--

    Copyright 2013 Alexey Ragozin

    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>
        <groupId>org.gridkit.coherence-tools</groupId>
        <artifactId>coherence-tools-parent-pom</artifactId>
        <version>1</version>
    </parent>

    <artifactId>chtest</artifactId>
    <version>0.2.3</version>
    <name>Coherence test utils</name>
    <description>Utility classes for unit and integration testing</description>

    <scm>
        <connection>scm:svn:https://gridkit.googlecode.com/svn/coherence-tools/tags/chtest-0.2.3</connection>
        <developerConnection>scm:svn:https://gridkit.googlecode.com/svn/coherence-tools/tags/chtest-0.2.3</developerConnection>
        <url>http://gridkit.googlecode.com/svn/coherence-tools/tags/chtest-0.2.3</url>
    </scm>

    <properties>
        <coherence.version>3.7.1.3</coherence.version>
        <junit.version>4.10</junit.version>
        <nanocloud.version>0.7.18</nanocloud.version>
    </properties>

    <dependencies>

        <dependency>
            <groupId>org.gridkit.lab</groupId>
            <artifactId>telecontrol-ssh</artifactId>
            <version>${nanocloud.version}</version>
        </dependency>

        <!-- Coherence -->
        <dependency>
            <groupId>com.oracle.coherence</groupId>
            <artifactId>coherence</artifactId>
            <version>${coherence.version}</version>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>1.0.9</version>
            <scope>test</scope>
        </dependency>
        
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.4</version>
                <configuration>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <remoteTagging>false</remoteTagging>
                    <suppressCommitBeforeTag>true</suppressCommitBeforeTag>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.0</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.14.1</version>
                <configuration>
                    <!-- Decoration is causing problem in certain environments -->
                    <argLine>-Dgridkit.isolate.class-source-decoration=false</argLine>
                    <reuseForks>false</reuseForks>
                    <useSystemClassLoader>true</useSystemClassLoader>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.9</version>
                <executions>
                    <execution>
                        <id>attach-javadoc</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.2.1</version>
                <executions>
                    <execution>
                        <id>attach-source</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>2.6</version>
                <configuration>
                    <encoding>UTF-8</encoding>
                </configuration> 
            </plugin>                
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>2.8</version>
                <executions>
                    <!-- 
                        Executions below are needed to enforce jars download to local repository.
                        These jars could be dynamically added to classpath during test runs.
                     -->
                    <execution>
                        <id>coherence-3.7.1.8</id>
                        <phase>test-compile</phase>
                        <goals>
                            <goal>get</goal>
                        </goals>
                        <configuration>
                            <artifact>com.oracle.coherence:coherence:3.7.1.8</artifact>
                        </configuration>
                    </execution>
                    <execution>
                        <id>coherence-3.7.1.7</id>
                        <phase>test-compile</phase>
                        <goals>
                            <goal>get</goal>
                        </goals>
                        <configuration>
                            <artifact>com.oracle.coherence:coherence:3.7.1.7</artifact>
                        </configuration>
                    </execution>
                    <execution>
                        <id>chtest-0.2.1</id>
                        <phase>test-compile</phase>
                        <goals>
                            <goal>get</goal>
                        </goals>
                        <configuration>
                            <artifact>${project.groupId}:${project.artifactId}:0.2.1</artifact>
                        </configuration>
                    </execution>
                </executions>
            </plugin>                
        </plugins>
        <pluginManagement>
            <plugins>
                <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
                <plugin>
                    <groupId>org.eclipse.m2e</groupId>
                    <artifactId>lifecycle-mapping</artifactId>
                    <version>1.0.0</version>
                    <configuration>
                        <lifecycleMappingMetadata>
                            <pluginExecutions>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>org.apache.maven.plugins</groupId>
                                        <artifactId>maven-dependency-plugin</artifactId>
                                        <versionRange>[2.8,)</versionRange>
                                        <goals>
                                            <goal>get</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <ignore />
                                    </action>
                                </pluginExecution>
                            </pluginExecutions>
                        </lifecycleMappingMetadata>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
</project>
