<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.socialnetworking</groupId>
	<artifactId>social-data-search-client</artifactId>
	<version>1.2.0-SNAPSHOT</version>
	<packaging>jar</packaging>

	<name>Social Data Search Client</name>
	<description>
		This library extends the functionalities of the elastic-search client in order to perform full-text search
		on a previously created elasticsearch index that contains posts/comments present in the Social Cassandra cluster.
	</description>

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

	<properties>
		<elasticSearchVersion>2.2.0</elasticSearchVersion>
		<guavaVersion>18.0</guavaVersion>
		<serviceClass>social-networking</serviceClass>
		<distroDirectory>distro</distroDirectory>
		<maven.compiler.source>1.7</maven.compiler.source>
		<maven.compiler.target>1.7</maven.compiler.target>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
	</properties>
	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>org.gcube.distribution</groupId>
				<artifactId>maven-portal-bom</artifactId>
				<version>LATEST</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<dependencies>
		<dependency>
			<groupId>org.gcube.socialnetworking</groupId>
			<artifactId>social-data-indexing-common</artifactId>
			<version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
		</dependency>
		<dependency>
			<groupId>org.gcube.portal</groupId>
			<artifactId>social-networking-library</artifactId>
			<version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
		</dependency>
		<dependency>
			<groupId>org.elasticsearch</groupId>
			<artifactId>elasticsearch</artifactId>
			<version>${elasticSearchVersion}</version>
		</dependency>
		<dependency>
			<groupId>com.google.guava</groupId>
			<artifactId>guava</artifactId>
			<version>${guavaVersion}</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>com.ning</groupId>
			<artifactId>compress-lzf</artifactId>
			<version>1.0.3</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>com.netflix.astyanax</groupId>
			<artifactId>astyanax-core</artifactId>
			<scope>provided</scope>
			<exclusions>
				<exclusion>
					<groupId>org.slf4j</groupId>
					<artifactId>log4j-over-slf4j</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>com.netflix.astyanax</groupId>
			<artifactId>astyanax-thrift</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>com.netflix.astyanax</groupId>
			<artifactId>astyanax-cassandra</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.resources.discovery</groupId>
			<artifactId>ic-client</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.common.portal</groupId>
			<artifactId>portal-manager</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.core</groupId>
			<artifactId>common-encryption</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.8</version>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<resources>
			<resource>
				<directory>src/main/java</directory>
				<includes>
					<include>**/*.*</include>
				</includes>
			</resource>
		</resources>
		<plugins>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<source>1.7</source>
					<target>1.7</target>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<version>2.2</version>
				<executions>
					<execution>
						<goals>
							<goal>test-jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.12</version>
				<configuration>
					<skipTests>true</skipTests>
				</configuration>
			</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>
				<version>2.2</version>
				<configuration>
					<descriptors>
						<descriptor>${distroDirectory}/descriptor.xml</descriptor>
					</descriptors>
					<archive>
						<manifest>
							<mainClass>fully.qualified.MainClass</mainClass>
						</manifest>
					</archive>
					<!-- <descriptorRefs> -->
					<!-- <descriptorRef>jar-with-dependencies</descriptorRef> -->
					<!-- </descriptorRefs> -->
				</configuration>
				<executions>
					<execution>
						<id>servicearchive</id>
						<phase>install</phase>
						<goals>
							<goal>single</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
</project>
