<?xml version="1.0" encoding="UTF-8"?>
<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>
    <groupId>org.hotswapagent</groupId>
    <artifactId>hotswap-agent-parent</artifactId>
    <packaging>pom</packaging>
    <version>1.1.0</version>

    <name>Hotswap Agent Aggregator parent</name>
    <description>Agregator for Hotswap Agent projects parent</description>
    <url>https://github.com/HotswapProjects/HotswapAgent</url>

    <issueManagement>
        <system>git</system>
        <url>https://github.com/HotswapProjects/HotswapAgent/issues</url>
    </issueManagement>

    <scm>
        <connection>scm:git:http://github.com/HotswapProjects/HotswapAgent.git</connection>
        <developerConnection>scm:git:git@github.com/HotswapProjects/HotswapAgent.git</developerConnection>
        <url>https://github.com/HotswapProjects/HotswapAgent</url>
    </scm>

    <licenses>
        <license>
            <name>GNU General Public License (GPL)</name>
            <url>http://www.gnu.org/licenses/gpl.txt</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>bubnik</id>
            <name>Jiri Bubnik</name>
            <roles>
                <role>Admin</role>
            </roles>
            <organizationUrl>http://jiribubnik.cz</organizationUrl>
        </developer>
    </developers>
    <build>
        <pluginManagement>
            <plugins>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.1</version>
                    <configuration>
                        <source>1.7</source>
                        <target>1.7</target>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>2.8</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.15</version>
                    <configuration>
                        <skipTests>true</skipTests>
                    </configuration>
                </plugin>
                <plugin>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <version>2.17</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>integration-test</goal>
                                <goal>verify</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <!--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>properties</goal>-->
                						<!--</goals>-->
                					<!--</pluginExecutionFilter>-->
                					<!--<action>-->
                						<!--<execute />-->
                					<!--</action>-->
                				<!--</pluginExecution>-->
                			<!--</pluginExecutions>-->
                		<!--</lifecycleMappingMetadata>-->
                	<!--</configuration>-->
                <!--</plugin>-->
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>test-compile</phase>
                        <goals>
                            <goal>properties</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!-- executes test with -javaagent option -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
	                <useSystemClassLoader>true</useSystemClassLoader>
	                <useManifestOnlyJar>false</useManifestOnlyJar>
	                <!--
	                <useSystemClassLoader>true</useSystemClassLoader>
	                <useManifestOnlyJar>false</useManifestOnlyJar>
                    <argLine>-XXaltjvm=${dcevm} -javaagent:${org.hotswap.agent:hotswap-agent-core:jar} -Xbootclasspath/a:"${org.hotswap.agent:hotswap-agent-core:jar}:${project.build.OutputDirectory}"</argLine>
                     -->

                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>2.2.1</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar</goal>
                                    <goal>test-jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>deployRepo</id>

            <build>

                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>3.0.0</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                                <configuration>
                                    <additionalparam>-Xdoclint:none</additionalparam>
                                    <failOnError>false</failOnError>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>2.2.1</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <configuration>
                                    <useAgent>false</useAgent>

                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.7</version>
                        <extensions>true</extensions>
                        <executions>
                            <execution>
                                <id>default-deploy</id>
                                <phase>deploy</phase>
                                <goals>
                                    <goal>deploy</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>false</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <activation>
                <jdk>(,1.9)</jdk>
            </activation>

            <dependencyManagement>
                <dependencies>
                    <!-- Tools jar is needed at runtime to allow JPDA hotswap -->
                    <dependency>
                        <groupId>com.sun</groupId>
                        <artifactId>tools</artifactId>
                        <version>${java.version}</version>
                        <scope>system</scope>
                        <systemPath>${java.home}/../lib/tools.jar</systemPath>
                        <optional>true</optional>
                    </dependency>
                </dependencies>
            </dependencyManagement>
        </profile>
    </profiles>

    <dependencyManagement>
        <dependencies>
            <!-- Test dependencies -->
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.11</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.jmock</groupId>
                <artifactId>jmock-junit4</artifactId>
                <version>2.6.0</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.jmock</groupId>
                <artifactId>jmock-legacy</artifactId>
                <version>2.6.0</version>
                <scope>test</scope>
            </dependency>

        </dependencies>
    </dependencyManagement>
    <distributionManagement>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
            <layout>default</layout>
        </repository>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
    </distributionManagement>
    <properties>
        <dcevm>server</dcevm>
        <project.build.outputEncoding>UTF-8</project.build.outputEncoding>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    </properties>
</project>
