<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>com.chrisnewland</groupId>
    <artifactId>jitwatch</artifactId>
    <version>1.0.0</version>

    <name>JITWatch</name>
    <description>Visualisation of JIT behaviour</description>
    <url>https://github.com/AdoptOpenJDK/jitwatch</url>
    <inceptionYear>2013</inceptionYear>

    <prerequisites>
        <maven>3.2.1</maven>
    </prerequisites>

    <licenses>
        <license>
            <name>Simplified BSD License</name>
            <url>http://opensource.org/licenses/BSD-2-Clause</url>
            <distribution>repo</distribution>
            <comments>Simplified BSD License</comments>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Chris Newland</name>
            <url>http://www.chrisnewland.com</url>
            <email>chris@chrisnewland.com</email>
            <timezone>GMT</timezone>
        </developer>
    </developers>

    <contributors>
        <contributor>
            <name>Martijn Verburg</name>
            <timezone>GMT</timezone>
        </contributor>
        <contributor>
            <name>Mani Sarkar</name>
            <timezone>GMT</timezone>
        </contributor>
        <contributor>
            <name>Stefan Ferstl</name>
        </contributor>
        <contributor>
            <name>Philip Aston</name>
        </contributor>
        <contributor>
            <name>Marshall Pierce</name>
        </contributor>
        <contributor>
            <name>Ben Evans</name>
        </contributor>
        <contributor>
            <name>David Schlosnagle</name>
        </contributor>
        <contributor>
            <name>Trask Stalnaker</name>
        </contributor>
        <contributor>
            <name>Chris Vest</name>
        </contributor>
        <contributor>
            <name>Jean-Philippe BEMPEL</name>
        </contributor>
        <contributor>
            <name>Sebastian Sickelmann</name>
        </contributor>
        <contributor>
            <name>Rafael Winterhalter</name>
        </contributor>
        <contributor>
            <name>Andres Almiray</name>
        </contributor>
        <contributor>
            <name>Alex Bertram</name>
        </contributor>
        <contributor>
            <name>Alex Blewitt</name>
        </contributor>
    </contributors>

    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/chriswhocodes/jitwatch/issues</url>
    </issueManagement>

    <ciManagement>
        <system>Jenkins</system>
        <url>http://chriswhocodes.com/jenkins/jitwatch/</url>
    </ciManagement>

    <mailingLists>
        <mailingList>
            <name>General</name>
            <post>jitwatch@googlegroups.com</post>
            <unsubscribe>jitwatch+unsubscribe@googlegroups.com</unsubscribe>
        </mailingList>
    </mailingLists>

    <scm>
        <connection>scm:git:https://github.com/AdoptOpenJDK/jitwatch.git</connection>
        <developerConnection>scm:git:git@github.com:AdoptOpenJDK/jitwatch.git</developerConnection>
        <url>${project.url}</url>
        <tag>jitwatch-1.0.0</tag>
    </scm>
    
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <slf4j.version>1.7.7</slf4j.version>
        <logback.version>1.1.2</logback.version>
        <main.class>org.adoptopenjdk.jitwatch.launch.LaunchUI</main.class>
    </properties>

    <profiles>
    <!--========================================= JDK 7 ============================================== -->
        <profile>
            <id>jdk7</id>
            <activation>
                <jdk>1.7</jdk>
            </activation>
            <properties>
                <tools.jar>${java.home}/../lib/tools.jar</tools.jar>
                <jfxrt.jar>${java.home}/lib/jfxrt.jar</jfxrt.jar>
                <jdk.version>1.7</jdk.version>
                <!-- Actually 2.2.x depending on what Java 7 you have -->
                <javafx.version>2.2</javafx.version>
            </properties>
            <dependencies>
                <dependency>
                    <groupId>com.oracle</groupId>
                    <artifactId>tools</artifactId>
                    <version>${jdk.version}</version>
                    <systemPath>${tools.jar}</systemPath>
                    <scope>system</scope>
		</dependency>
            <!-- System dependencies -->
		<dependency>
                	<groupId>com.oracle</groupId>
	                <artifactId>javafx</artifactId>
	                <version>${javafx.version}</version>
	                <systemPath>${jfxrt.jar}</systemPath>
	                <scope>system</scope>
		</dependency>
            </dependencies>
        </profile>
        
    <!--========================================= JDK 8 ============================================== -->
        
        <profile>    
            <id>jdk8</id>
            <activation>
                <jdk>1.8</jdk>
            </activation>
            <properties>
                <tools.jar>${java.home}/../lib/tools.jar</tools.jar>
                <jfxrt.jar>${java.home}/lib/ext/jfxrt.jar</jfxrt.jar>
                <jdk.version>1.8</jdk.version>
                <!-- Generic version number as Oracle doesn't release separate jars -->
                <javafx.version>8</javafx.version>
            </properties>
            <dependencies>
                <dependency>
                    <groupId>com.oracle</groupId>
                    <artifactId>tools</artifactId>
                    <version>${jdk.version}</version>
                    <systemPath>${tools.jar}</systemPath>
                    <scope>system</scope>
                </dependency>
            </dependencies>
        </profile>
        
   <!--========================================= JDK9 ============================================== -->
    	<profile>
            <id>jdk9</id>
            <activation>
                <jdk>[1.9,9]</jdk>
            </activation>
            <properties>
                <jdk.version>1.9</jdk.version>
                <!-- Generic version number as Oracle doesn't release separate jars -->
                <javafx.version>9</javafx.version>
            </properties>
        </profile>

   <!--============================ Deploy to Sonatype Staging Repo ================================ -->
        <profile>
            <id>deploy-to-sonatype-oss</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
</profiles>
        
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${slf4j.version}</version>
            </dependency>
            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-classic</artifactId>
                <version>${logback.version}</version>
            </dependency>
            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-core</artifactId>
                <version>${logback.version}</version>
            </dependency>
            
            <!-- Test dependencies -->
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.11</version>
                <scope>test</scope>
            </dependency>           
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-core</artifactId>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
        </dependency>
    </dependencies>

   <!--========================================= Maven Central Stuff  ============================================== -->

<distributionManagement>
  <snapshotRepository>
    <id>ossrh</id>
    <url>https://oss.sonatype.org/content/repositories/snapshots</url>
  </snapshotRepository>
  <repository>
    <id>ossrh</id>
    <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
  </repository>
</distributionManagement>

    <build>
        <pluginManagement>
            <plugins>
		<plugin>
			<groupId>org.sonatype.plugins</groupId>
			<artifactId>nexus-staging-maven-plugin</artifactId>
			<version>1.6.3</version>
			<extensions>true</extensions>
			<configuration>
				<serverId>ossrh</serverId>
				<nexusUrl>https://oss.sonatype.org/</nexusUrl>
				<autoReleaseAfterClose>true</autoReleaseAfterClose>
			</configuration>
		</plugin>

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-release-plugin</artifactId>
  <version>2.5</version>
  <configuration>
    <autoVersionSubmodules>true</autoVersionSubmodules>
    <useReleaseProfile>false</useReleaseProfile>
    <releaseProfiles>release</releaseProfiles>
    <goals>deploy</goals>
  </configuration>
</plugin>

              <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-antrun-plugin</artifactId>
                    <version>1.7</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>2.4</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-clean-plugin</artifactId>
                    <version>2.5</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.1</version>
                    <configuration>
                        <source>${jdk.version}</source>
                        <target>${jdk.version}</target>
                        <compilerArgument>-Xlint:unchecked</compilerArgument>
        		        <compilerArgument>-g:source,lines</compilerArgument>
                    </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-deploy-plugin</artifactId>
                    <version>2.8.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <version>2.17</version>
                </plugin>
                <plugin>
                      <groupId>org.apache.maven.plugins</groupId>
                      <artifactId>maven-gpg-plugin</artifactId>
                      <version>1.4</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>2.5.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>2.6</version>
                    <configuration>
                        <archive>
                            <manifest>
                                <mainClass>${main.class}</mainClass>
                            </manifest>
                        </archive>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>2.10.1</version>
                    <configuration>
                        <additionalparam>-Xdoclint:none</additionalparam>
                        <links>
                            <link>http://docs.oracle.com/javase/8/docs/api/</link>
                        </links>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>2.6</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>2.4</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.17</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-war-plugin</artifactId>
                    <version>2.4</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>exec-maven-plugin</artifactId>
                    <version>1.3</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>3.3</version>
                    <configuration>
                        <reportPlugins>
                            <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-jxr-plugin</artifactId>
                                <version>2.3</version>
                            </plugin>
                            <plugin>
                                <groupId>org.apache.maven.plugins</groupId>
                                <artifactId>maven-pmd-plugin</artifactId>
                                <version>2.7.1</version>
                                <configuration>
                                    <targetJdk>${jdk.version}</targetJdk>
                                </configuration>
                            </plugin>
                            <plugin>
                                <groupId>org.apache.maven.plugins</groupId>
                                <artifactId>maven-project-info-reports-plugin</artifactId>
                                <version>2.6</version>
                            </plugin>
                            <plugin>
                                <groupId>org.codehaus.mojo</groupId>
                                <artifactId>findbugs-maven-plugin</artifactId>
                                <version>2.5.2</version>
                            </plugin>
                            <plugin>
                                <groupId>org.codehaus.mojo</groupId>
                                <artifactId>jdepend-maven-plugin</artifactId>
                                <version>2.0-beta-2</version>
                            </plugin>
                            <plugin>
                                <groupId>org.codehaus.mojo</groupId>
                                <artifactId>versions-maven-plugin</artifactId>
                                <version>2.0</version>
                                <reportSets>
                                    <reportSet>
                                        <reports>
                                            <report>dependency-updates-report</report>
                                            <report>plugin-updates-report</report>
                                            <report>property-updates-report</report>
                                        </reports>
                                    </reportSet>
                                </reportSets>
                            </plugin>
                        </reportPlugins>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>license-maven-plugin</artifactId>
                    <version>1.6</version>
                </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.codehaus.mojo
                                        </groupId>
                                        <artifactId>
                                            license-maven-plugin
                                        </artifactId>
                                        <versionRange>
                                            [1.6,)
                                        </versionRange>
                                        <goals>
                                            <goal>
                                                check-file-header
                                            </goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <ignore />
                                    </action>
                                </pluginExecution>
                            </pluginExecutions>
                        </lifecycleMappingMetadata>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>      
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>default-cli</id>
                        <goals>
                            <goal>java</goal>
                        </goals>
                        <configuration>
                            <mainClass>${main.class}</mainClass>
                            <cleanupDaemonThreads>false</cleanupDaemonThreads>
                            <classpathScope>compile</classpathScope>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>          
    </build>
</project>
