<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.3.0-SNAPSHOT</version>
	</parent>

	<groupId>org.gcube.vremanagement</groupId>
	<artifactId>smart-executor</artifactId>
	<version>4.0.0-SNAPSHOT</version>
	<name>SmartExecutor</name>
	<description>Smart Executor Service allows to launch recurrent tasks such as task for infrastructure management, healthy monitoring etc.</description>
	<packaging>war</packaging>

	<properties>
		<java.version>17</java.version>
        <maven.compiler.source>${java.version}</maven.compiler.source>
        <maven.compiler.target>${java.version}</maven.compiler.target>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<orientdb.version>3.1.12</orientdb.version>
		<enunciate.version>2.18.1</enunciate.version>
		<webappDirectory>${project.basedir}${file.separator}src${file.separator}main${file.separator}webapp${file.separator}WEB-INF</webappDirectory>
	</properties>

	<scm>
		<connection>scm:git:https://code-repo.d4science.org/gCubeSystem/${project.artifactId}.git</connection>
		<developerConnection>scm:git:https://code-repo.d4science.org/gCubeSystem/${project.artifactId}.git</developerConnection>
		<url>https://code-repo.d4science.org/gCubeSystem/${project.artifactId}</url>
	</scm>

	<developers>
	    <developer>
			<id>luca.frosini</id>
			<name>Luca Frosini</name>
			<email>luca.frosini@isti.cnr.it</email>
			<url>https://www.isti.cnr.it/en/about/people-detail/141/Frosini_Luca</url>
			<organization>ISTI-CNR</organization>
	      	<organizationUrl>https://www.isti.cnr.it/</organizationUrl>
			<roles>
				<role>researcher</role>
				<role>developer</role>
			</roles>
			<timezone>Europe/Rome</timezone>
			<properties>
				<orcidId>0000-0003-3183-2291</orcidId>
				<orcidUrl>https://orcid.org/0000-0003-3183-2291</orcidUrl>
			</properties>
	    </developer>
	</developers>
	
	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>org.gcube.distribution</groupId>
				<artifactId>gcube-smartgears-bom</artifactId>
				<version>4.0.1-SNAPSHOT</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<dependencies>
		<dependency>
			<groupId>org.gcube.core</groupId>
			<artifactId>common-smartgears</artifactId>
		</dependency>
		<dependency>
			<groupId>org.gcube.core</groupId>
			<artifactId>common-smartgears-app</artifactId>
		</dependency>
		<dependency>
			<groupId>org.gcube.common</groupId>
			<artifactId>health-api</artifactId>
		</dependency>
		
		<dependency>
			<groupId>org.gcube.resources.discovery</groupId>
			<artifactId>ic-client</artifactId>
		</dependency>
		<dependency>
			<groupId>org.gcube.resources.discovery</groupId>
			<artifactId>discovery-client</artifactId>
		</dependency>
		<dependency>
			<groupId>org.gcube.core</groupId>
			<artifactId>common-encryption</artifactId>
		</dependency>
		
		<dependency>
			<groupId>org.gcube.common</groupId>
			<artifactId>common-security</artifactId>
		</dependency>
		<dependency>
			<groupId>org.gcube.common.security</groupId>
			<artifactId>gcube-secrets</artifactId>
		</dependency>

		<dependency>
			<groupId>com.orientechnologies</groupId>
			<artifactId>orientdb-client</artifactId>
			<version>${orientdb.version}</version>
		</dependency>
		
		<dependency>
			<groupId>org.gcube.information-system</groupId>
			<artifactId>information-system-model</artifactId>
		</dependency>
		<dependency>
			<groupId>org.gcube.resource-management</groupId>
			<artifactId>gcube-model</artifactId>
		</dependency>
		<dependency>
			<groupId>org.gcube.information-system</groupId>
			<artifactId>resource-registry-client</artifactId>
		</dependency>
		<dependency>
			<groupId>org.gcube.information-system</groupId>
			<artifactId>resource-registry-publisher</artifactId>
		</dependency>
		
		<dependency>
			<groupId>org.gcube.vremanagement</groupId>
			<artifactId>smart-executor-api</artifactId>
			<version>[4.0.0-SNAPSHOT, 5.0.0-SNAPSHOT)</version>
		</dependency>
		<dependency>
			<groupId>org.gcube.vremanagement</groupId>
			<artifactId>smart-executor-client</artifactId>
			<version>[4.0.0-SNAPSHOT, 5.0.0-SNAPSHOT)</version>
		</dependency>

		<dependency>
			<groupId>org.glassfish.jersey.containers</groupId>
			<artifactId>jersey-container-servlet</artifactId>
		</dependency>
		
		<dependency>
            <groupId>jakarta.servlet</groupId>
            <artifactId>jakarta.servlet-api</artifactId>
			<scope>provided</scope>
        </dependency>
		<dependency>
		    <groupId>jakarta.ws.rs</groupId>
		    <artifactId>jakarta.ws.rs-api</artifactId>
		</dependency>
		<dependency>
    		<groupId>jakarta.xml.ws</groupId>
    		<artifactId>jakarta.xml.ws-api</artifactId>
		</dependency>
		<dependency>
			<groupId>com.sun.xml.ws</groupId>
			<artifactId>jaxws-rt</artifactId>
		</dependency>

		<!-- START OF Jersey -->
		<dependency>
			<groupId>org.glassfish.jersey.containers</groupId>
			<artifactId>jersey-container-servlet</artifactId>
		</dependency>
		<!-- One of jersey-hk2 or jersey-cdi2-se is needed to allow ResourceIntializer working -->
		<dependency>
			<groupId>org.glassfish.jersey.inject</groupId>
			<artifactId>jersey-cdi2-se</artifactId>
		</dependency>		
		<!-- 
		<dependency>
			<groupId>org.glassfish.jersey.inject</groupId>
			<artifactId>jersey-hk2</artifactId>
		</dependency>
		-->
		<!-- END OF Jersey -->
		
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
		</dependency>
		
		
		<!-- Required for Enunciate plugin -->
		<dependency>
			<groupId>com.webcohesion.enunciate</groupId>
			<artifactId>enunciate-core-annotations</artifactId>
			<version>${enunciate.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>com.webcohesion.enunciate</groupId>
			<artifactId>enunciate-rt-util</artifactId>
			<version>${enunciate.version}</version>
			<scope>provided</scope>
		</dependency>
		<!-- END Required for Enunciate plugin -->
		
		
		<!-- Tests -->
		<dependency>
			<groupId>org.gcube.common</groupId>
			<artifactId>d4science-iam-client</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.common.security</groupId>
			<artifactId>gcube-secrets</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.vremanagement</groupId>
			<artifactId>hello-world-se-plugin</artifactId>
			<version>[3.0.0-SNAPSHOT, 4.0.0-SNAPSHOT)</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>ch.qos.logback</groupId>
			<artifactId>logback-classic</artifactId>
			<scope>test</scope>
		</dependency>
	</dependencies>
	
	
	<build>
		<plugins>
			<plugin>
				<groupId>kr.motd.maven</groupId>
				<artifactId>sphinx-maven-plugin</artifactId>
				<version>2.10.0</version>
				<configuration>
					<outputDirectory>${project.build.directory}${file.separator}${project.build.finalName}${file.separator}docs</outputDirectory>
					<builder>html</builder>
					<configDirectory>${project.basedir}${file.separator}documentation${file.separator}sphinx</configDirectory>
					<sourceDirectory>${project.basedir}${file.separator}documentation${file.separator}sphinx</sourceDirectory>
				</configuration>
				<executions>
					<execution>
						<phase>process-resources</phase>
						<goals>
							<goal>generate</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>com.webcohesion.enunciate</groupId>
				<artifactId>enunciate-maven-plugin</artifactId>
				<version>${enunciate.version}</version>
				<executions>
					<execution>
						<id>assemble</id>
						<goals>
							<goal>assemble</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<configFile>${project.basedir}${file.separator}documentation${file.separator}enunciate${file.separator}enunciate.xml</configFile>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-resources-plugin</artifactId>
				<executions>
					<execution>
						<id>copy-enunciate-docs</id>
						<phase>process-resources</phase>
						<goals>
							<goal>copy-resources</goal>
						</goals>
						<configuration>
							<outputDirectory>target</outputDirectory>
							<resources>
								<resource>
									<targetPath>${project.build.directory}${file.separator}${project.artifactId}-${project.version}${file.separator}api-docs</targetPath>
									<directory>${project.build.directory}/api-docs</directory>
									<filtering>true</filtering>
								</resource>
							</resources>
						</configuration>
					</execution>
				</executions>
			</plugin>

		</plugins>
	</build>
	
</project>