<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-javax</artifactId>
		<version>1.4.0-SNAPSHOT</version>
	</parent>

	<groupId>org.gcube.common</groupId>
	<artifactId>gx-jrs-javax</artifactId>
	<version>1.0.0-SNAPSHOT</version>
	<packaging>jar</packaging>
	<name>gCube eXtensions to JAX-RS (Javax)</name>
	<description>gCube eXtensions to REST based on JAX-RS</description>

	<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>
		<repo.name>gx-jrs</repo.name>
	</properties>

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

	<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>
		<dependency>
			<groupId>org.gcube.common</groupId>
			<artifactId>gx-http</artifactId>
		</dependency>
		<dependency>
			<groupId>org.gcube.common</groupId>
			<artifactId>gcube-jackson-databind</artifactId>
		</dependency>
		<dependency>
			<groupId>org.gcube.common</groupId>
			<artifactId>gcube-jackson-core</artifactId>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
		</dependency>

		<!-- javax -->
		<dependency>
			<groupId>javax.xml.ws</groupId>
			<artifactId>jaxws-api</artifactId>
		</dependency>
		<dependency>
			<groupId>com.sun.xml.ws</groupId>
			<artifactId>jaxws-rt</artifactId>
		</dependency>
		<dependency>
			<groupId>javax.ws.rs</groupId>
			<artifactId>javax.ws.rs-api</artifactId>
		</dependency>

		<!-- Test Dependency -->
		<!-- <dependency>
			<groupId>org.glassfish.jersey.core</groupId>
			<artifactId>jersey-client</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.glassfish.jersey.inject</groupId>
			<artifactId>jersey-hk2</artifactId>
			<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>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.ws.rs</token>
							<value>javax.ws.rs</value>
						</replacement>
						<replacement>
							<token>jakarta.xml.ws</token>
							<value>javax.xml.ws</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>
