<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/maven-v4_0_0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<groupId>cd.connect.openapi</groupId>
	<artifactId>connect-openapi-jersey3</artifactId>
	<packaging>jar</packaging>
	<name>connect-openapi-jersey3</name>
	<version>9.2</version>

	<description>
		jersey3 generator from openapi 3.x spec files. Changing to openapitools dependencies.
	</description>

	<url>https://www.featurehub.io</url>
	<developers>
		<developer>
			<email>info@featurehub.io</email>
			<id>rvowles</id>
			<name>Richard Vowles</name>
			<organization>FeatureHub</organization>
		</developer>
	</developers>

	<licenses>
		<license>
			<name>Apache License 2.0</name>
			<url>https://opensource.org/licenses/Apache-2.0</url>
		</license>
	</licenses>

	<scm>
		<connection>scm:git:git@github.com:featurehub-io/java-cloud-utils/connect-java.git</connection>
		<developerConnection>scm:git:git@github.com:featurehub-io/java-cloud-utils/connect-java.git</developerConnection>
		<url>git@github.com:featurehub-io/connect-java.git</url>
		<tag>connect-openapi-jersey3-9.2</tag>
	</scm>

	<properties>
		<openapi-codegen-version>7.0.1</openapi-codegen-version>
		<kotlin.version>1.9.0</kotlin.version>
	</properties>

	<prerequisites>
		<maven>3.8</maven>
	</prerequisites>

	<dependencies>
		<dependency>
			<groupId>org.jetbrains</groupId>
			<artifactId>annotations</artifactId>
			<version>23.0.0</version>
		</dependency>

		<dependency>
			<groupId>org.jetbrains.kotlin</groupId>
			<artifactId>kotlin-stdlib-jdk8</artifactId>
			<version>${kotlin.version}</version>
		</dependency>

		<dependency>
			<groupId>org.jetbrains.kotlin</groupId>
			<artifactId>kotlin-reflect</artifactId>
			<version>${kotlin.version}</version>
		</dependency>

		<dependency>
			<groupId>org.openapitools</groupId>
			<artifactId>openapi-generator-core</artifactId>
			<version>${openapi-codegen-version}</version>
			<scope>provided</scope>
			<exclusions>
				<exclusion>
					<groupId>com.google.guava</groupId>
					<artifactId>guava</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>org.openapitools</groupId>
			<artifactId>openapi-generator-cli</artifactId>
			<version>${openapi-codegen-version}</version>
			<scope>provided</scope>
			<exclusions>
				<exclusion>
					<groupId>com.google.guava</groupId>
					<artifactId>guava</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
    <dependency>
      <groupId>com.google.googlejavaformat</groupId>
      <artifactId>google-java-format</artifactId>
      <version>1.17.0</version>
	    <!-- there is a bug in 1.17.0 -> guava dep which misses buildOrThrow -->
	    <exclusions>
		    <exclusion>
			    <groupId>com.google.guava</groupId>
			    <artifactId>guava</artifactId>
		    </exclusion>
	    </exclusions>
    </dependency>
		<dependency>
			<groupId>com.google.guava</groupId>
			<artifactId>guava</artifactId>
			<version>32.0.1-jre</version>
		</dependency>
		<dependency>
			<groupId>org.openapitools</groupId>
			<artifactId>openapi-generator-maven-plugin</artifactId>
			<version>${openapi-codegen-version}</version>
			<scope>provided</scope>
		</dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.13.2</version>
      <scope>test</scope>
    </dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>io.repaint.maven</groupId>
				<artifactId>tiles-maven-plugin</artifactId>
				<version>2.23</version>
				<extensions>true</extensions>
				<configuration>
					<filtering>false</filtering>
					<tiles>
						<tile>cd.connect.tiles:tile-release:[1.1,2)</tile>
					</tiles>
				</configuration>
			</plugin>
			<plugin>
				<!-- if including source jars, use the no-fork goals
						 otherwise both the Groovy sources and Java stub sources
						 will get included in your jar -->
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<!-- source plugin \> = 2.1 is required to use the no-fork goals -->
				<version>3.0.0</version>
				<executions>
					<execution>
						<id>attach-sources</id>
						<goals>
							<goal>jar-no-fork</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>3.0.0-M3</version>
				<configuration>
					<includes>
						<include>**/*Test.java</include>
					</includes>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>3.2.0</version>
				<configuration>
					<source>11</source>
					<detectJavaApiLink>false</detectJavaApiLink>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.jetbrains.kotlin</groupId>
				<artifactId>kotlin-maven-plugin</artifactId>
				<version>${kotlin.version}</version>
				<executions>
					<execution>
						<id>compile</id>
						<goals>
							<goal>compile</goal>
						</goals>
						<configuration>
							<sourceDirs>
								<sourceDir>${project.basedir}/src/main/kotlin</sourceDir>
								<sourceDir>${project.basedir}/src/main/java</sourceDir>
								<jvmTarget>11</jvmTarget>
							</sourceDirs>
						</configuration>
					</execution>
					<execution>
						<id>test-compile</id>
						<goals> <goal>test-compile</goal> </goals>
						<configuration>
							<sourceDirs>
								<sourceDir>${project.basedir}/src/test/kotlin</sourceDir>
								<sourceDir>${project.basedir}/src/test/java</sourceDir>
								<jvmTarget>11</jvmTarget>
							</sourceDirs>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.11.0</version>
				<configuration>
					<release>11</release>
					<source>11</source>
					<target>11</target>
					<executable>javac11</executable>
					<useIncrementalCompilation>false</useIncrementalCompilation>
				</configuration>
				<executions>
					<!-- Replacing default-compile as it is treated specially by maven -->
					<execution>
						<id>default-compile</id>
						<phase>none</phase>
						<configuration />
					</execution>
					<!-- Replacing default-testCompile as it is treated specially by maven -->
					<execution>
						<id>default-testCompile</id>
						<phase>none</phase>
						<configuration />
					</execution>
					<execution>
						<id>java-compile</id>
						<phase>compile</phase>
						<goals>
							<goal>compile</goal>
						</goals>
						<configuration />
					</execution>
					<execution>
						<id>java-test-compile</id>
						<phase>test-compile</phase>
						<goals>
							<goal>testCompile</goal>
						</goals>
						<configuration />
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-invoker-plugin</artifactId>
				<version>3.2.0</version>
				<configuration>
					<projectsDirectory>src/it</projectsDirectory>
					<cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
					<postBuildHookScript>verify</postBuildHookScript>
					<localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
					<settingsFile>src/it/settings.xml</settingsFile>
					<debug>true</debug>
				</configuration>
				<executions>
					<execution>
						<id>integration-test</id>
						<goals>
							<goal>install</goal>
							<goal>run</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

</project>
