<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>

	<parent>
		<groupId>org.gcube.tools</groupId>
		<artifactId>maven-parent</artifactId>
		<version>1.0.0</version>
		<relativePath />
	</parent>

	<groupId>org.gcube.data.access</groupId>
	<artifactId>tree-uri-resolver</artifactId>
	<packaging>war</packaging>
	<version>1.1.0-3.2.0</version>

	<name>Tree URI Resolver</name>
	<description>Resolves tree URIs</description>
	<properties>
		<distroDirectory>distro</distroDirectory>
		<webappName>tree</webappName>
	</properties>

	<scm>
		<connection>scm:svn:http://svn.d4science.research-infrastructures.eu/gcube/trunk/data-access/${project.artifactId}</connection>
		<developerConnection>scm:svn:https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-access/${project.artifactId}</developerConnection>
		<url>http://svn.d4science.research-infrastructures.eu/gcube/trunk/data-access/${project.artifactId}</url>
	</scm>

	<repositories>

		<repository>
			<id>snapshot-repository.java.net</id>
			<name>Java.net Snapshot Repository for Maven</name>
			<url>https://maven.java.net/content/repositories/snapshots/</url>
			<layout>default</layout>
		</repository>

	</repositories>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>org.jboss.arquillian</groupId>
				<artifactId>arquillian-bom</artifactId>
				<version>1.0.0.Final</version>
				<type>pom</type>
			</dependency>

		</dependencies>
	</dependencyManagement>


	<dependencies>


		<!--************ COMPILE ************ -->

		<dependency>
			<groupId>org.gcube.data.access</groupId>
			<artifactId>trees</artifactId>
			<version>1.4.2-3.2.0</version>
		</dependency>

		<!-- jax-rs support for servlet container that does not support it -->
		<dependency>
			<groupId>com.sun.jersey</groupId>
			<artifactId>jersey-server</artifactId>
			<version>1.14</version>
		</dependency>

		<!-- directs all slf4j calls to underlying log4j configuration used by 
			the client ghn -->
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-log4j12</artifactId>
			<version>1.6.4</version>
			<scope>runtime</scope>
		</dependency>

		<!-- abilitates log4j logging without clashing with servlet container's 
			libraries -->
		<dependency>
			<groupId>log4j</groupId>
			<artifactId>log4j</artifactId>
			<version>1.2.16</version>
			<scope>runtime</scope>
		</dependency>

		<!--************ RUNTIME ************ -->

		<dependency>
			<groupId>com.sun.jersey</groupId>
			<artifactId>jersey-servlet</artifactId>
			<version>1.14</version>
			<scope>runtime</scope>
		</dependency>


		<!--************ TEST ************ -->

		<!-- http client -->

		<dependency>
			<groupId>com.sun.jersey</groupId>
			<artifactId>jersey-client</artifactId>
			<version>1.14</version>
			<scope>test</scope>
		</dependency>

		<!-- tomcat 7 embedded -->
		<dependency>
			<groupId>org.apache.tomcat.embed</groupId>
			<artifactId>tomcat-embed-core</artifactId>
			<version>7.0.19</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.apache.tomcat.embed</groupId>
			<artifactId>tomcat-embed-logging-juli</artifactId>
			<version>7.0.19</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.apache.tomcat.embed</groupId>
			<artifactId>tomcat-embed-jasper</artifactId>
			<version>7.0.19</version>
			<scope>test</scope>
		</dependency>

		<!-- arquillian & shrinkwrap for in-container testing -->
		<dependency>
			<groupId>org.jboss.arquillian.container</groupId>
			<artifactId>arquillian-tomcat-embedded-7</artifactId>
			<version>1.0.0.CR3</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.jboss.arquillian.junit</groupId>
			<artifactId>arquillian-junit-container</artifactId>
			<version>1.0.0.CR7</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.jboss.shrinkwrap.resolver</groupId>
			<artifactId>shrinkwrap-resolver-depchain</artifactId>
			<version>2.0.0-alpha-2</version>
			<type>pom</type>
			<scope>test</scope>
		</dependency>

		<!-- junit -->
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.10</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-all</artifactId>
			<version>1.9.0</version>
		</dependency>

		<!-- desperate measure: indirectly this brings ghn-core-runtime that brings 
			in old jndi which breaks testing putting it last makes tomcat's jndi come 
			first -->
		<dependency>
			<groupId>org.gcube.data.access</groupId>
			<artifactId>tree-manager-library</artifactId>
			<version>3.0.1-3.2.0</version>
		</dependency>

<!-- 		<dependency>
			<groupId>org.gcube.distribution</groupId>
			<artifactId>ghn-client-runtime</artifactId>
			<version>[2.0.0-SNAPSHOT,3.0.0-SNAPSHOT)</version>
		</dependency> -->

	</dependencies>

	<build>



		<plugins>

			<plugin>
				<artifactId>maven-war-plugin</artifactId>
				<version>2.1.1</version>
				<executions>
					<execution>
						<id>default-war</id>
						<phase>package</phase>
						<configuration>
							<warName>${webappName}</warName>
						</configuration>
						<goals>
							<goal>war</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-resources-plugin</artifactId>
				<version>2.5</version>
				<executions>
					<execution>
						<id>copy-profile</id>
						<phase>install</phase>
						<goals>
							<goal>copy-resources</goal>
						</goals>
						<configuration>
							<outputDirectory>target</outputDirectory>
							<resources>
								<resource>
									<directory>${distroDirectory}</directory>
									<filtering>true</filtering>
									<includes>
										<include>profile.xml</include>
									</includes>
								</resource>
							</resources>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-assembly-plugin</artifactId>
				<configuration>
					<descriptors>
						<descriptor>${distroDirectory}/descriptor.xml</descriptor>
					</descriptors>
				</configuration>
				<executions>
					<execution>
						<id>servicearchive</id>
						<configuration>
							<finalName>${project.artifactId}-${project.version}</finalName>
						</configuration>
						<phase>install</phase>
						<goals>
							<goal>single</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

		</plugins>

	</build>
</project>
