<?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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>de.openstreetmap</groupId>
    <artifactId>josm</artifactId>
    <packaging>jar</packaging>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>
    <version>custom</version>
    <name>JOSM</name>
    <url>http://josm.openstreetmap.de/</url>
    <scm>
        <connection>scm:svn:https://josm.openstreetmap.de/svn/trunk</connection>
        <url>https://josm.openstreetmap.de/svn/trunk</url>
    </scm>
    <build>
        <directory>/tmp/josmtarget</directory>
        <!--<finalName>josm-snapshot-${buildNumber}</finalName>-->
        <sourceDirectory>src</sourceDirectory>
        <testSourceDirectory>test</testSourceDirectory>
        <resources>
            <resource>
                <directory>data</directory>
                <targetPath>data</targetPath>
            </resource>
            <resource>
                <directory>images</directory>
                <targetPath>images</targetPath>
            </resource>
            <resource>
                <directory>styles</directory>
                <targetPath>styles</targetPath>
            </resource>
            <resource>
                <directory>.</directory>
                <includes>
                    <include>REVISION</include>
                </includes>
                <filtering>true</filtering>
                <!--<targetPath>${project.build.directory}</targetPath>-->
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>buildnumber-maven-plugin</artifactId>
                <version>1.2</version>
                <executions>
                    <execution>
                        <phase>validate</phase>
                        <goals>
                            <goal>create</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <timestampFormat>{0,date,yyyy-MM-dd HH:mm:ss}</timestampFormat>
                    <items>
                        <item>buildNumber</item>
                    </items>
                    <doCheck>false</doCheck>
                    <doUpdate>false</doUpdate>
                </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.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <version>1.2.1</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>exec</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <workingDirectory>/tmp</workingDirectory>
                    <mainClass>JOSM</mainClass>
                    <arguments>
                        <argument>--set=expert=true</argument>
                        <argument>--set=remotecontrol.enabled=true</argument>
                        <argument>--set=debug.edt-checker.enable=false</argument>
                    </arguments>
                    <systemProperties>
                        <systemProperty>
                            <key>josm.home</key>
                            <value>/tmp/.josm/</value>
                        </systemProperty>
                    </systemProperties>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.4</version>
                <configuration>
                    <archive>
                        <manifest>
                            <addClasspath>true</addClasspath>
                            <classpathPrefix>/</classpathPrefix>
                            <mainClass>JOSM</mainClass>
                        </manifest>
                        <manifestEntries>
                            <Main-Version>${buildNumber}</Main-Version>
                            <Main-Date>${timestamp}</Main-Date>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>
            <!--<plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                    <descriptorRefs>
                        <descriptorRef>jar-with-dependencies</descriptorRef>
                    </descriptorRefs>
                </configuration>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>-->
            <plugin>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>install</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/lib</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <dependencies>
        <!--
            http://docs.codehaus.org/display/MAVEN/Dependency+Mediation+and+Conflict+Resolution
            (,1.0]            x <= 1.0
            1.0                "Soft" requirement on 1.0 (just a recommendation - helps select the correct version if it matches all ranges)
            [1.0]            Hard requirement on 1.0
            [1.2,1.3]        1.2 <= x <= 1.3
            [1.0,2.0)        1.0 <= x < 2.0
            [1.5,)            x >= 1.5
            (,1.0],[1.2,)    x <= 1.0 or x >= 1.2. Multiple sets are comma-separated
            (,1.1),(1.1,)    This excludes 1.1 if it is known not to work in combination with this library
        -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.7</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.easytesting</groupId>
            <artifactId>fest-reflect</artifactId>
            <version>1.4</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.unitils</groupId>
            <artifactId>unitils</artifactId>
            <version>2.4</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
</project>
