<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>occurrence</artifactId>
    <groupId>org.gcube.data.harmonization</groupId>
    <version>1.0.0-SNAPSHOT</version>
    <relativePath>..</relativePath>
  </parent>
  <artifactId>occurrence-service</artifactId>
  <name>occurrence-service</name>
  <dependencies>
  	<dependency>
  		<groupId>org.gcube.data.harmonization</groupId>
  		<artifactId>occurrence-stubs</artifactId>
  		<version>${project.version}</version>
  	</dependency>
  	<dependency>
  		<groupId>org.gcube.tools</groupId>
  		<artifactId>my-container</artifactId>
  		<version>1.0.0</version>
  		<scope>test</scope>
  	</dependency>
  		<dependency>
		<groupId>com.j256.ormlite</groupId><artifactId>ormlite-core</artifactId><version>4.40</version>
		</dependency>
		<dependency>
		<groupId>com.j256.ormlite</groupId><artifactId>ormlite-jdbc</artifactId><version>4.40</version>
		</dependency>
		<dependency>
    <groupId>com.h2database</groupId>
    <artifactId>h2</artifactId>
    <version>1.3.167</version>
    <scope>test</scope>
		</dependency>
		<dependency>
  <groupId>com.rabbitmq</groupId>
  <artifactId>amqp-client</artifactId>
  <version>2.8.2</version>
		</dependency>
		<dependency>
			<groupId>com.thoughtworks.xstream</groupId>
			<artifactId>xstream</artifactId>
			<version>1.2.2</version>
		</dependency>
  </dependencies>
  
  <build>

		<plugins>
			<plugin>
				<groupId>org.gcube.tools</groupId>
				<artifactId>maven-service-plugin</artifactId>
				<executions>
					<execution>
						<id>make-gar</id>
						<goals>
							<goal>gar-gen</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<artifactId>maven-dependency-plugin</artifactId>
				<executions>
					<execution>
						<id>install-my-container</id>
						<phase>generate-test-resources</phase>
						<configuration>
							<artifactItems>
								<artifactItem>
									<groupId>org.gcube.tools</groupId>
									<artifactId>my-container</artifactId>
									<version>1.0.0</version>
									<type>tar.gz</type>
									<classifier>distro</classifier>
									<overWrite>false</overWrite>
									<outputDirectory>${project.basedir}</outputDirectory>
								</artifactItem>
							</artifactItems>
							<markersDirectory>${project.basedir}</markersDirectory>
						</configuration>
						<goals>
							<goal>unpack</goal>
						</goals>
					</execution>
				</executions>
			</plugin>


			<!-- generates service archive -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-assembly-plugin</artifactId>
				<version>2.2</version>
				<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>