<?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>com.graphhopper</groupId>
    <artifactId>graphhopper-web</artifactId>
    <packaging>jar</packaging>
    <version>0.3</version>
    <name>GraphHopper Web</name>
    <description>Example on how to use GraphHopper in a web-based application</description>
        
    <parent>
        <groupId>com.graphhopper</groupId>
        <artifactId>graphhopper-parent</artifactId>    	
        <version>0.3</version>
    </parent>
    <properties>
        <jetty.version>8.1.14.v20131031</jetty.version>
    </properties>
    
    <dependencies>
        <dependency>
            <groupId>com.graphhopper</groupId>
            <artifactId>graphhopper</artifactId>
            <version>${project.parent.version}</version>            
        </dependency>
        <!--  TODO <dependency>
            <groupId>org.codehaus.jackson</groupId>
            <artifactId>jackson-core-asl</artifactId>
            <version>1.9.12</version>
        </dependency>       
        <dependency>
            <groupId>org.codehaus.jackson</groupId>
            <artifactId>jackson-mapper-asl</artifactId>
            <version>1.9.12</version>
        </dependency>-->
        <dependency>
            <groupId>org.json</groupId>
            <artifactId>json</artifactId>
            <version>20140107</version>            
        </dependency>        
        <dependency>
            <groupId>com.google.inject</groupId>
            <artifactId>guice</artifactId>
            <version>3.0</version>
        </dependency>
        
        <!-- necessary to use guice ('@Inject') in servlets -->
        <dependency>
            <groupId>com.google.inject.extensions</groupId>
            <artifactId>guice-servlet</artifactId>
            <version>3.0</version>
        </dependency>
        
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <version>3.0.1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j.version}</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>${slf4j.version}</version>
            <scope>runtime</scope>
        </dependency>
        
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>${log4j.version}</version>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-servlets</artifactId>
            <version>${jetty.version}</version>
        </dependency>
        
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-server</artifactId>
            <version>${jetty.version}</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-servlet</artifactId>
            <version>${jetty.version}</version>
        </dependency>
        
        <!-- for integration tests of service -->
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-webapp</artifactId>
            <version>${jetty.version}</version>
            <scope>test</scope>
        </dependency>
        <!--
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <version>4.2.5</version>
            <scope>test</scope>
        </dependency>
        -->
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.17</version>
            </plugin>
            <!-- create a jar file too, so others can use it more easily -->
            <plugin>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.4</version>
                <configuration>
                    <attachClasses>true</attachClasses>
                </configuration>
            </plugin>            
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>2.4</version>
                <configuration>
                    <archive>
                        <manifest>
                            <mainClass>com.graphhopper.http.GHServer</mainClass>
                        </manifest>
                    </archive>
                    <descriptors>
                        <descriptor>src/main/assembly/jar.xml</descriptor>
                        <!-- this is defined to be executed afterwards -->
                        <descriptor>src/main/assembly/zip.xml</descriptor>
                    </descriptors>
                </configuration>
                <executions>
                    <execution>
                        <id>make-assembly</id>
                        <!-- bind to verify and not package to pass integration tests before creating assemblies -->
                        <phase>integration-test</phase> 
                       <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>

<!--
                <executions>
                    <execution>
                        <id>build-jar</id>
                        <configuration>
                            <archive>
                                <manifest>
                                    <mainClass>com.graphhopper.http.GHServer</mainClass>
                                </manifest>
                            </archive>
                    
                            <descriptorRefs>
                                <descriptorRef>jar-with-dependencies</descriptorRef>
                            </descriptorRefs>
                        </configuration>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>                        
                    </execution>
                    <execution>
                        <id>build-zip</id>
                        
                        <configuration>
                            <appendAssemblyId>false</appendAssemblyId>
                            <descriptors>
                                <descriptor>src/main/assembly/zip.xml</descriptor>                                        
                            </descriptors>                            
                        </configuration>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
                -->
                <!--                <executions>
                    <execution>
                        <id>make-assembly</id>  this is used for inheritance merges 
                        <phase>package</phase>  bind to the packaging phase 
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>-->
            </plugin>
 
        </plugins>
    </build>

</project>


