<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>
	<parent>
		<artifactId>maven-parent</artifactId>
		<groupId>org.gcube.tools</groupId>
		<version>1.0.0</version>
		<relativePath />
	</parent>

	<groupId>org.gcube.core</groupId>
	<artifactId>common-ghn-service</artifactId>
	<version>1.0.0-SNAPSHOT</version>
	<name>Common gHN Service</name>

	<properties>
		<distroDirectory>distro</distroDirectory>
		<tomcat.version>7.0.40</tomcat.version>
		<jersey.version>1.17.1</jersey.version>
	</properties>

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

	<dependencies>

		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>1.6.4</version>
		</dependency>

		<dependency>
			<groupId>org.gcube.resources</groupId>
			<artifactId>registry-publisher</artifactId>
			<version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
		</dependency>

		<dependency>
			<groupId>org.gcube.resources</groupId>
			<artifactId>common-gcore-resources</artifactId>
			<version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
		</dependency>

		<dependency>
			<groupId>org.hibernate</groupId>
			<artifactId>hibernate-validator</artifactId>
			<version>5.0.1.Final</version>
		</dependency>

		<dependency>
			<groupId>org.gcube.core</groupId>
			<artifactId>common-scope</artifactId>
			<version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
		</dependency>

		<dependency>
			<groupId>org.gcube.core</groupId>
			<artifactId>common-events</artifactId>
			<version>[1.0.0-SNAPSHOT,2.0.0-SNAPSHOT)</version>
		</dependency>

		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>javax.servlet-api</artifactId>
			<version>3.0.1</version>
			<scope>provided</scope>
		</dependency>


		<!-- ***************** test ******************* -->

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

		<dependency>
			<groupId>com.sun.jersey</groupId>
			<artifactId>jersey-client</artifactId>
			<version>${jersey.version}</version>
			<scope>test</scope>
		</dependency>


		<dependency>
			<groupId>org.apache.tomcat.embed</groupId>
			<artifactId>tomcat-embed-core</artifactId>
			<version>${tomcat.version}</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.apache.tomcat.embed</groupId>
			<artifactId>tomcat-embed-logging-log4j</artifactId>
			<version>${tomcat.version}</version>
			<scope>test</scope>
		</dependency>



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

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

		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-log4j12</artifactId>
			<version>1.6.4</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-core</artifactId>
			<version>1.9.0</version>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>

		<plugins>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-resources-plugin</artifactId>
				<version>2.5</version>
				<executions>
					<execution>
						<id>copy-classes</id>
						<phase>test-compile</phase>
						<goals>
							<goal>copy-resources</goal>
						</goals>
						<configuration>
							<outputDirectory>${basedir}/target/acme/WEB-INF/classes</outputDirectory>
							<resources>
								<resource>
									<directory>target/test-classes</directory>
									<includes>
										<include>org/acme/webapp/**</include>
									</includes>
								</resource>
								<resource>
									<directory>target/classes</directory>
								</resource>
							</resources>
						</configuration>
					</execution>
					<execution>
						<id>copy-web-inf</id>
						<phase>test-compile</phase>
						<goals>
							<goal>copy-resources</goal>
						</goals>
						<configuration>
							<outputDirectory>${basedir}/target/acme/WEB-INF</outputDirectory>
							<resources>
								<resource>
									<directory>src/test/resources/WEB-INF</directory>
								</resource>
							</resources>
						</configuration>
					</execution>
					<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>
				<artifactId>maven-jar-plugin</artifactId>
				<version>2.3.2</version>
				<configuration>
					<archive>
						<manifestEntries>
							<Premain-Class>org.gcube.common.ghn.client.launchers.ShellLauncher</Premain-Class>
						</manifestEntries>
					</archive>
				</configuration>
			</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>
						<phase>install</phase>
						<goals>
							<goal>single</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

		</plugins>
	</build>
</project>