<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>
	</parent>

	<groupId>org.gcube.data.analysis</groupId>
	<artifactId>sampleService</artifactId>
	<version>1.0.0-SNAPSHOT</version>
	<packaging>pom</packaging>


	<name>sampleService</name>
	<url>http://maven.apache.org</url>
	<modules>
		<module>sampleService-service</module>
		<module>sampleService-stubs</module>
	</modules>

	<properties>
		<stubsArtifactId>sampleService-stubs</stubsArtifactId>
		<serviceArtifactId>sampleService-service</serviceArtifactId>

		<wsdlDirectory>${project.basedir}/../wsdl</wsdlDirectory>
		<wsdlOutputDirectory>${project.basedir}/../target/generated-sources/wsdl</wsdlOutputDirectory>
		<configDirectory>${project.basedir}/../config</configDirectory>
		<distroDirectory>${project.basedir}/../distro</distroDirectory>
		<namespace>http://gcube-system.org/namespaces/data/analysis/sampleService</namespace>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	</properties>
	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>org.gcube.distribution</groupId>
				<artifactId>maven-bom</artifactId>
				<version>LATEST</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>
	<dependencies>
		<dependency>
			<groupId>org.gcube.distribution</groupId>
			<artifactId>wsrf-tools</artifactId>
			
		</dependency>
		<dependency>
			<groupId>org.gcube.distribution</groupId>
			<artifactId>ghn-core-runtime</artifactId>
			<version>1.0.0</version>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>3.8.1</version>
			<scope>test</scope>
		</dependency>
	</dependencies>
	<build>

		<!-- defines basic configuration for the service plugin -->
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.gcube.tools</groupId>
					<artifactId>maven-service-plugin</artifactId>
					<version>1.2.0</version>
					<configuration>
						<serviceId>${project.parent.artifactId}</serviceId>
						<configurationDirectory>../config</configurationDirectory>
						<wsdlDirectory>../wsdl</wsdlDirectory>
						<wsdlOutputDirectory>../target/wsdl</wsdlOutputDirectory>
						<basePackage>org.gcube.data.analysis.sampleService</basePackage>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>

		<plugins>

			<!-- interpolates profiles and copies from distribution location to configuration 
				location, where it is need for embedding into stub artifact, gar generation, 
				and service archive. -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-resources-plugin</artifactId>
				<version>2.6</version>
				<executions>
					<execution>
						<id>copy-profile</id>
						<goals>
							<goal>copy-resources</goal>
						</goals>
						<phase>process-resources</phase>
						<configuration>
							<outputDirectory>${configDirectory}</outputDirectory>
							<resources>
								<resource>
									<directory>${distroDirectory}</directory>
									<includes>
										<include>profile.xml</include>
									</includes>
									<filtering>true</filtering>
								</resource>
							</resources>
						</configuration>
					</execution>
				</executions>
			</plugin>

		</plugins>

	</build>

</project>
