<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-javax</artifactId>
		<groupId>org.gcube.tools</groupId>
		<version>1.4.0-SNAPSHOT</version>
		<relativePath />
	</parent>

	<scm>
		<connection>
			scm:git:https://code-repo.d4science.org/gCubeSystem/storagehub-client-library.git</connection>
		<developerConnection>
			scm:git:https://code-repo.d4science.org/gCubeSystem/storagehub-client-library.git</developerConnection>
		<url>
			https://code-repo.d4science.org/gCubeSystem/storagehub-client-library</url>
	</scm>

	<groupId>org.gcube.common</groupId>
	<artifactId>storagehub-client-library-javax</artifactId>
	<version>3.0.0-SNAPSHOT</version>
	<name>storagehub-client-library-javax</name>

	<properties>
		<java.version>21</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>
		<webappDirectory>
			${project.basedir}${file.separator}src${file.separator}main${file.separator}webapp${file.separator}WEB-INF</webappDirectory>
		<repo.name>storagehub-client-library</repo.name>
	</properties>


	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>org.gcube.distribution</groupId>
				<artifactId>gcube-bom-javax</artifactId>
				<version>4.0.1-SNAPSHOT</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>


	<dependencies>
		<!-- gCube dependencies -->
		<dependency>
			<groupId>org.gcube.common</groupId>
			<artifactId>storagehub-model</artifactId>
		</dependency>
		<dependency>
			<groupId>org.gcube.core</groupId>
			<artifactId>common-gcube-calls</artifactId>
		</dependency>
		<dependency>
			<groupId>org.gcube.common</groupId>
			<artifactId>common-jaxrs-client-javax</artifactId>
		</dependency>
		<dependency>
			<groupId>org.gcube.core</groupId>
			<artifactId>common-generic-clients-javax</artifactId>
		</dependency>

		<!-- Former JDK dependencies -->
		<dependency>
			<groupId>javax.inject</groupId>
			<artifactId>javax.inject</artifactId>
			<version>1</version>
		</dependency>
		<dependency>
			<groupId>javax.xml.ws</groupId>
			<artifactId>jaxws-api</artifactId>
		</dependency>
		<dependency>
			<groupId>org.glassfish.jersey.media</groupId>
			<artifactId>jersey-media-json-jackson</artifactId>
		</dependency>
		<dependency>
			<groupId>org.glassfish.jersey.media</groupId>
			<artifactId>jersey-media-multipart</artifactId>
		</dependency>
		<dependency>
			<groupId>com.sun.xml.bind</groupId>
			<artifactId>jaxb-impl</artifactId>
		</dependency>
		<dependency>
			<groupId>com.sun.xml.ws</groupId>
			<artifactId>jaxws-rt</artifactId>
		</dependency>

		<!-- Other dependencies -->
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
		</dependency>

		<!-- Test dependencies -->
		<dependency>
			<groupId>org.gcube.common</groupId>
			<artifactId>d4science-iam-client-javax</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.gcube.common.security</groupId>
			<artifactId>gcube-secrets-javax</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>ch.qos.logback</groupId>
			<artifactId>logback-classic</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>commons-io</groupId>
			<artifactId>commons-io</artifactId>
			<version>2.4</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>com.opencsv</groupId>
			<artifactId>opencsv</artifactId>
			<version>5.3</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>gov.nih.imagej</groupId>
			<artifactId>imagej</artifactId>
			<version>1.47</version>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-resources-plugin</artifactId>
				<executions>
					<execution>
						<id>copy-sources</id>
						<phase>initialize</phase>
						<goals>
							<goal>copy-resources</goal>
						</goals>
						<configuration>
							<outputDirectory>${project.build.directory}/generated-sources/javax</outputDirectory>
							<resources>
								<resource>
									<directory>src/main/java</directory>
									<filtering>false</filtering>
								</resource>
							</resources>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>com.google.code.maven-replacer-plugin</groupId>
				<artifactId>replacer</artifactId>
				<version>1.5.3</version>
				<executions>
					<execution>
						<phase>generate-sources</phase>
						<goals>
							<goal>replace</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<basedir>${project.build.directory}</basedir>
					<includes>
						<include>generated-sources/javax/**/*.java</include>
					</includes>
					<replacements>
						<replacement>
							<token>jakarta.xml.bind</token>
							<value>javax.xml.bind</value>
						</replacement>
						<replacement>
							<token>jakarta.xml.ws</token>
							<value>javax.xml.ws</value>
						</replacement>
						<replacement>
							<token>jakarta.xml.soap</token>
							<value>javax.xml.soap</value>
						</replacement>
						<replacement>
							<token>jakarta.ws.rs</token>
							<value>javax.ws.rs</value>
						</replacement>
						<replacement>
							<token>jakarta.jws</token>
							<value>javax.jws</value>
						</replacement>
						<replacement>
							<token>jakarta.inject</token>
							<value>javax.inject</value>
						</replacement>
					</replacements>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<compileSourceRoots>
						<compileSourceRoot>${project.build.directory}/generated-sources/javax</compileSourceRoot>
					</compileSourceRoots>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<configuration>
					<skip>true</skip>
				</configuration>
			</plugin>
		</plugins>
	</build>
</project>