<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>
		<groupId>org.gcube.tools</groupId>
		<artifactId>maven-parent</artifactId>
		<version>1.0.0</version>
	</parent>

	<groupId>org.gcube.resourcemanagement</groupId>
	<artifactId>executor-parent</artifactId>
	<version>1.2.2-3.6.0</version>
	<packaging>pom</packaging>

	<name>Executor Reactor</name>

	<properties>

		<stubsArtifactId>executor-stubs</stubsArtifactId>
		<serviceArtifactId>executor-service</serviceArtifactId>

		<namespace>http://gcube-system.org/namespaces/vremanagement/executor</namespace>

		<wsdlDirectory>${project.basedir}/../wsdl</wsdlDirectory>
		<wsdlOutputDirectory>${project.basedir}/../target/generated-sources/wsdl</wsdlOutputDirectory>
		<configDirectory>${project.basedir}/../config</configDirectory>
		<distroDirectory>${project.basedir}/../distro</distroDirectory>

	</properties>

	<dependencyManagement>

		<dependencies>

			<dependency>
				<groupId>org.gcube.core</groupId>
				<artifactId>gcf</artifactId>
				<version>1.6.2-3.6.0</version>
				<scope>provided</scope>
			</dependency>

		</dependencies>

	</dependencyManagement>

	<build>

		<!-- defines basic configuration for the service plugin -->
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.gcube.tools</groupId>
					<artifactId>maven-service-plugin</artifactId>
					<version>1.1.0</version>
					<configuration>
						<serviceId>executor</serviceId>
						<basePackage>org.gcube.vremanagement.executor</basePackage>
						<wsdlDirectory>${wsdlDirectory}</wsdlDirectory>
						<wsdlOutputDirectory>${wsdlOutputDirectory}</wsdlOutputDirectory>
						<configurationDirectory>${configDirectory}</configurationDirectory>
					</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>

	<modules>
		<module>executor-stubs</module>
		<module>executor-service</module>
	</modules>
</project>