<?xml version="1.0"?>
<project
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
	xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<modelVersion>4.0.0</modelVersion>
	<parent>
		<artifactId>consumer</artifactId>
		<groupId>org.gcube.messaging</groupId>
		<version>1.9.2-3.3.0</version>
	</parent>
	<artifactId>consumer-service</artifactId>

	<name>consumer-service</name>
	<url>http://maven.apache.org</url>
	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	</properties>
	<dependencies>
		<dependency>
			<groupId>org.gcube.core</groupId>
			<artifactId>gcf</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.hsqldb</groupId>
			<artifactId>hsqldb</artifactId>
			<version>2.2.8</version>
		</dependency>
		<dependency>
			<groupId>commons-dbcp</groupId>
			<artifactId>commons-dbcp</artifactId>
			<version>1.4</version>
		</dependency>
		<dependency>
			<groupId>commons-pool</groupId>
			<artifactId>commons-pool</artifactId>
			<version>1.6</version>
		</dependency>
		<dependency>
			<groupId>org.gcube.messaging</groupId>
			<artifactId>accounting-system</artifactId>
			<version>1.2.0-3.3.0</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.messaging</groupId>
			<artifactId>messages</artifactId>
		</dependency>
		<dependency>
				<groupId>active-mq</groupId>
				<artifactId>activemq-core</artifactId>
				<version>5.2.0</version>
				<scope>compile</scope>
		</dependency>

		<dependency>
			<groupId>org.mortbay.jetty</groupId>
			<artifactId>jetty</artifactId>
			<version>7.0.0.pre5</version>
		</dependency>
		<dependency>
			<groupId>org.gcube.messaging</groupId>
			<artifactId>producer</artifactId>
		</dependency>
		<dependency>
			<groupId>javax.mail</groupId>
			<artifactId>mail</artifactId>
			<version>1.4.4</version>
		</dependency>
		<dependency>
			<groupId>org.gcube.dvos</groupId>
			<artifactId>usermanagement-stub</artifactId>
			<version>1.0.2-3.3.0</version>
		</dependency>
		<dependency>
			<groupId>org.gcube.messaging</groupId>
			<artifactId>consumer-stubs</artifactId>
			<version>1.9.2-3.3.0</version>
		</dependency>
		<dependency>
			<groupId>mysql</groupId>
			<artifactId>mysql-connector-java</artifactId>
			<version>5.1.18</version>
			<scope>runtime</scope>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.10</version>
			<scope>test</scope>
		</dependency>
		<!-- runtime -->
		<dependency>
			<groupId>org.gcube.tools</groupId>
			<artifactId>my-container</artifactId>
			<version>2.0.0-3.3.0</version>
			 <scope>test</scope> 
		</dependency>

		<!-- distro -->
		<dependency>
			<groupId>org.gcube.tools</groupId>
			<artifactId>my-container</artifactId>
			<version>2.0.0-3.3.0</version>
			<type>tar.gz</type>
			<classifier>distro</classifier>
			<scope>test</scope> 
		</dependency>
		<dependency>
			<groupId>org.gcube.common</groupId>
			<artifactId>messaging-endpoint</artifactId>
		</dependency>
	</dependencies>
	<build>
		<plugins>
			<plugin>
				<groupId>org.gcube.tools</groupId>
				<artifactId>maven-service-plugin</artifactId>
				<configuration>
					<fullGar>true</fullGar>
					<attachFullGar>true</attachFullGar>
				</configuration>
				<executions>
					<execution>
						<id>make-gar</id>
						<goals>
							<goal>gar-gen</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-dependency-plugin</artifactId>
				<version>2.4</version>
				<executions>
					<execution>
						<id>install-my-container</id>
						<phase>generate-test-resources</phase><!-- runs before tests -->
						<configuration>
							<includeArtifactIds>my-container</includeArtifactIds>
							<includeTypes>tar.gz</includeTypes>
							<overWriteIfNewer>false</overWriteIfNewer>
							<outputDirectory>${project.basedir}</outputDirectory>
							<markersDirectory>${project.basedir}</markersDirectory>
						</configuration>
						<goals>
							<goal>unpack-dependencies</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-assembly-plugin</artifactId>
				<version>2.2</version>
				<configuration>
					<descriptors>
						<descriptor>../distro/descriptor.xml</descriptor>
					</descriptors>
				</configuration>
				<executions>
					<execution>
						<id>servicearchive</id>
						<phase>install</phase>
						<goals>
							<goal>single</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>

		<pluginManagement>
			<plugins>
				<!--This plugin's configuration is used to store Eclipse m2e settings 
					only. It has no influence on the Maven build itself. -->
				<plugin>
					<groupId>org.eclipse.m2e</groupId>
					<artifactId>lifecycle-mapping</artifactId>
					<version>1.0.0</version>
					<configuration>
						<lifecycleMappingMetadata>
							<pluginExecutions>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>
											org.apache.maven.plugins
										</groupId>
										<artifactId>
											maven-dependency-plugin
										</artifactId>
										<versionRange>
											[2.3,)
										</versionRange>
										<goals>
											<goal>copy</goal>
											<goal>
												unpack-dependencies
											</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore></ignore>
									</action>
								</pluginExecution>
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>

	<profiles>
		<profile>
			<id>local-deploy</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.gcube.tools</groupId>
						<artifactId>maven-service-plugin</artifactId>
						<executions>
							<execution>
								<phase>package</phase>
								<goals>
									<goal>local-deploy</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
