<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>net.sf.jtreemap</groupId>
    <artifactId>ktreemap</artifactId>
    <!-- Version numbering scheme:
      - bump X.X.X if you're changing code base of the original library
      - bump XX if you're releasing own changes -->
    <version>1.1.0-atlassian-01</version>
    <packaging>jar</packaging>
    <description>
        This module contains source of KTreeMap taken from tag 1.1.0. Code was modified to
        remove references to java.awt.Color class to avoid AWT/SWT conflicts.
    </description>
    <licenses>
        <license>
            <name>Apache 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0</url>
        </license>
    </licenses>
    <name>KTreeMap Fork</name>
    <properties>
        <!-- disable maven-compiler-plugin as we use antrun -->
        <maven.main.skip>true</maven.main.skip>
    </properties>
    <scm>
        <url>https://bitbucket.org/atlassian/ktreemap</url>
        <connection>git@bitbucket.org:atlassian/ktreemap.git</connection>
        <developerConnection>git@bitbucket.org:atlassian/ktreemap.git</developerConnection>
    </scm>
    <issueManagement>
        <url>https://bitbucket.org/atlassian/ktreemap/issues</url>
    </issueManagement>
    <build>
        <plugins>
            <plugin>
                <!--
                Hint: the com.atlassian.clover:clover-eclipse-libs artifact is used internally only and is not published.
                In order to build this KTreeMap module, disable the maven-dependency-plugin and just copy JAR files from
                Eclipse installation into the target/eclipse directory -->
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>initialize</phase>
                        <goals>
                            <goal>unpack</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/eclipse</outputDirectory>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>com.atlassian.clover</groupId>
                                    <artifactId>clover-eclipse-libs</artifactId>
                                    <version>3.6.2</version>
                                    <classifier>bin</classifier>
                                    <type>zip</type>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>1.8</version>
                <executions>
                    <execution>
                        <phase>compile</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <target>
                        <!-- compile -->
                        <mkdir dir="${project.build.outputDirectory}"/>
                        <!-- Note: using fork with JAVA_HOME because Maven sets java.home to JRE_HOME -->
                        <javac destdir="${project.build.outputDirectory}"
                               srcdir="src/main/java"
                               fork="true" executable="${env.JAVA_HOME}/bin/javac"
                               debug="on"
                               debuglevel="lines,vars,source"
                               target="1.6"
                               source="1.6">
                            <classpath>
                                <path refid="maven.compile.classpath"/>
                                <!-- use unpacked eclipse jars -->
                                <fileset dir="${project.build.directory}/eclipse">
                                    <include name="*.jar"/>
                                </fileset>
                            </classpath>
                        </javac>
                        <!-- copy license file to put have it in JAR -->
                        <copy file="LICENSE.txt" todir="${project.build.outputDirectory}"/>
                    </target>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <distributionManagement>
        <repository>
            <id>atlassian-3rdparty</id>
            <url>https://maven.atlassian.com/3rdparty</url>
        </repository>
        <snapshotRepository>
            <id>atlassian-3rdparty-snapshot</id>
            <url>https://maven.atlassian.com/3rdparty-snapshot</url>
        </snapshotRepository>
    </distributionManagement>
</project>