<?xml version='1.0' encoding='UTF-8'?>
<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">
	<parent>
		<groupId>org.gcube.tools</groupId>
		<artifactId>maven-parent</artifactId>
		<version>1.3.0</version>
	</parent>
	<modelVersion>4.0.0</modelVersion>
	<groupId>org.gcube.core</groupId>
	<artifactId>common-smartgears</artifactId>
	<version>4.0.2</version>
	<name>SmartGears</name>
	<description>SmartGears framework for deploying and managing gCube services</description>
	<properties>
		<java.version>17</java.version>
		<maven.compiler.source>${java.version}</maven.compiler.source>
		<maven.compiler.target>${java.version}</maven.compiler.target>
		<tomcat.version>10.1.16</tomcat.version> <!-- The current version on Ubuntu 24.04 LTS -->
		<micrometer.version>1.9.17</micrometer.version>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<wiki>https://wiki.gcube-system.org/gcube/SmartGears</wiki>
	</properties>
	<scm>
		<connection>
			scm:git:https://code-repo.d4science.org/gCubeSystem/common-smartgears.git</connection>
		<developerConnection>
			scm:git:httpstps://code-repo.d4science.org/gCubeSystem/common-smartgears.git</developerConnection>
		<url>https://code-repo.d4science.org/gCubeSystem/common-smartgears</url>
	</scm>

	<developers>
		<developer>
			<id>lucio.lelii</id>
			<name>Lucio Lelii</name>
			<email>lucio.lelii@isti.cnr.it</email>
			<url>https://orcid.org/0000-0001-7581-5325</url>
			<organization>D4Science Infrastructure, Pisa, Italy</organization>
			<organizationUrl>https://www.d4science.org/</organizationUrl>
			<roles>
			<role>researcher</role>
			<role>architect</role>
			<role>developer</role>
			</roles>
			<timezone>Europe/Rome</timezone>
		</developer>
		<developer>
			<id>luca.frosini</id>
			<name>Luca Frosini</name>
			<email>luca.frosini@isti.cnr.it</email>
			<url>https://orcid.org/0000-0003-3183-2291</url>
			<organization>D4Science Infrastructure, Pisa, Italy</organization>
			<organizationUrl>https://www.d4science.org/</organizationUrl>
			<roles>
			<role>researcher</role>
			<role>maintainer</role>
			<role>developer</role>
			</roles>
			<timezone>Europe/Rome</timezone>
		</developer>
</developers>
	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>org.gcube.distribution</groupId>
				<artifactId>gcube-bom</artifactId>
				<version>4.0.2</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>
	<dependencies>
		<dependency>
			<groupId>io.github.classgraph</groupId>
			<artifactId>classgraph</artifactId>
			<version>4.8.179</version>
		</dependency>

		<!-- ini4j is used to to parse container.ini file -->
		<dependency>
			<groupId>org.ini4j</groupId>
			<artifactId>ini4j</artifactId>
			<version>0.5.4</version>
		</dependency>

		<!-- snakeyaml is used to parse application.yml files -->
		<dependency>
			<groupId>org.yaml</groupId>
			<artifactId>snakeyaml</artifactId>
		</dependency>

		<!-- gCube APIs to provide healt check -->
		<dependency>
			<groupId>org.gcube.common</groupId>
			<artifactId>health-api</artifactId>
			<version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
		</dependency>

		<!-- gCube security -->
		<dependency>
			<groupId>org.gcube.common</groupId>
			<artifactId>common-security</artifactId>
		</dependency>
		<!-- gcube-secrets is the implementation of Secret from common-security -->
		<dependency>
			<groupId>org.gcube.common.security</groupId>
			<artifactId>gcube-secrets</artifactId>
		</dependency>
		<!-- END gCube security -->


		<!-- gCube Accounting dependencies -->
		<dependency>
			<groupId>org.gcube.accounting</groupId>
			<artifactId>accounting-lib</artifactId>
		</dependency>
		<!-- END gCube Accounting dependencies -->

		<dependency>
			<groupId>org.gcube.core</groupId>
			<artifactId>common-events</artifactId>
		</dependency>

		<!-- micrometer is used to trace and export metrics -->
		<!-- https://mvnrepository.com/artifact/io.micrometer/micrometer-core -->
		<dependency>
			<groupId>io.micrometer</groupId>
			<artifactId>micrometer-core</artifactId>
			<version>${micrometer.version}</version>
		</dependency>
		<!-- micrometer-registry-prometheus is used to export metrics in prometheus -->
		<dependency>
			<groupId>io.micrometer</groupId>
			<artifactId>micrometer-registry-prometheus</artifactId>
			<version>${micrometer.version}</version>
		</dependency>

		<!-- slf4j-api is used for logging -->
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
		</dependency>
		<!-- logback-classic implementation of slf4j-api -->
		<dependency>
			<groupId>ch.qos.logback</groupId>
			<artifactId>logback-classic</artifactId>
		</dependency>
		<dependency>
			<groupId>jakarta.servlet</groupId>
			<artifactId>jakarta.servlet-api</artifactId>
			<version>6.0.0</version>
			<scope>provided</scope>
		</dependency>
		<!-- https://mvnrepository.com/artifact/org.apache.tomcat/tomcat-catalina -->
		<dependency>
			<groupId>org.apache.tomcat</groupId>
			<artifactId>tomcat-catalina</artifactId>
			<version>${tomcat.version}</version>
			<scope>provided</scope>
		</dependency>

		<!-- tests dependecies -->
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.10</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-core</artifactId>
			<version>1.9.0</version>
			<scope>test</scope>
		</dependency>
		<!-- END tests dependecies -->

	</dependencies>
	<build>
		<plugins>
			<!-- excludes probe package from jar -->
			<plugin>
				<artifactId>maven-jar-plugin</artifactId>
				<!-- version>2.3.2</version -->
				<executions>
					<execution>
						<id>default-jar</id>
						<phase>package</phase>
						<goals>
							<goal>jar</goal>
						</goals>
						<configuration>
							<excludes>
								<exclude>**/probe/**/*</exclude>
							</excludes>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<configuration>
					<systemPropertyVariables>
						<property>
							<name>projectVersion</name>
							<value>${project.version}</value>
						</property>
					</systemPropertyVariables>
				</configuration>
			</plugin>
			<!-- include probe in attached war -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-war-plugin</artifactId>
				<!-- version>2.4</version -->
				<configuration>
					<primaryArtifact>false</primaryArtifact>
					<classifier>probe</classifier>
					<packagingIncludes>
						WEB-INF/classes/org/gcube/smartgears/probe/**/*</packagingIncludes>
					<failOnMissingWebXml>false</failOnMissingWebXml>
				</configuration>
				<executions>
					<execution>
						<id>probe-war</id>
						<phase>package</phase>
						<goals>
							<goal>war</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
</project>
