<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>aquamapsservice</artifactId>
    <groupId>org.gcube.application</groupId>
    <version>4.0.0-SNAPSHOT</version>
    <relativePath>..</relativePath>
  </parent>
  <artifactId>aquamapsservice-service</artifactId>
  <name>aquamapsservice-service</name>
  
  <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>

	<build>

		<plugins>

			<!-- builds Gar at install time -->
			<plugin>
				<groupId>org.gcube.tools</groupId>
				<artifactId>maven-service-plugin</artifactId>
				<version>1.1.0</version>
					<configuration>
						<fullGar>true</fullGar>
					</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-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>

<!-- installs my-container distribution for integration testing -->
 			<plugin>
				<artifactId>maven-dependency-plugin</artifactId>
				<executions>
					<execution>
						<id>install-my-container</id>
						<phase>generate-test-resources</phase>
						<configuration>
							<includeArtifactIds>my-container</includeArtifactIds>
							<includeTypes>tar.gz</includeTypes>
							<overWriteIfNewer>true</overWriteIfNewer>
							<outputDirectory>${project.basedir}</outputDirectory>
							<markersDirectory>${project.basedir}</markersDirectory>
						</configuration>
						<goals>
							<goal>unpack-dependencies</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

		</plugins>
	</build>
	<dependencies>
		<dependency>
			<groupId>org.gcube.application</groupId>
			<artifactId>iscrawler</artifactId>
			<version>1.0.0</version>
		</dependency>
		<dependency>
			<groupId>commons-dbcp</groupId>
			<artifactId>commons-dbcp</artifactId>
			<version>1.4</version>
		</dependency>
		<dependency>
  <groupId>org.gcube.application</groupId>
  <artifactId>aquamapsservice-publisherlibrary</artifactId>
  <version>3.0.0-SNAPSHOT</version>
</dependency>
		<dependency>
			<groupId>org.gcube.contentmanagement</groupId>
			<artifactId>ecologicalmodelling</artifactId>
			<version>1.3.0</version>
		</dependency>
		<dependency>
			<groupId>org.gcube.common</groupId>
			<artifactId>geoserverinterface</artifactId>
			<version>1.9.1</version>
		</dependency>
		<dependency>
			<groupId>commons-codec</groupId>
			<artifactId>commons-codec</artifactId>
			<version>1.6</version>
		</dependency>
		<dependency>
			<groupId>org.gcube.application</groupId>
			<artifactId>aquamapsservice-cl</artifactId>
			<version>1.0.0-SNAPSHOT</version>
		</dependency>
		

<dependency>
			<groupId>org.gcube.tools</groupId>
			<artifactId>my-container</artifactId>
			<version>[2..0-SNAPSHOT,3.0.0-SNAPSHOT)</version>
			<scope>test</scope>
		</dependency>


		<!-- my-container distribution for integration testing -->
		<dependency>
			<groupId>org.gcube.tools</groupId>
			<artifactId>my-container</artifactId>
			<version>[2.0.0-SNAPSHOT,3.0.0-SNAPSHOT)</version>
			<type>tar.gz</type>
			<classifier>distro</classifier>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.8.2</version>
			<scope>test</scope>
		</dependency>
	</dependencies>
</project>