<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>

	<parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>3.0.3</version>
		<relativePath/>
	</parent>

	<groupId>com.shahabkondri</groupId>
	<artifactId>chat-gpt-api</artifactId>
	<version>1.0.2</version>
	<packaging>jar</packaging>

	<name>chat-gpt-api</name>
	<description>ChatGPT API</description>
	<url>https://github.com/shahabkondri/chat-gpt-api</url>

	<licenses>
		<license>
			<name>MIT License</name>
			<url>https://www.opensource.org/licenses/mit-license.php</url>
		</license>
	</licenses>

	<developers>
		<developer>
			<name>Shahab Kondri</name>
			<email>shahab.kondri@gmail.com</email>
			<url>https://github.com/shahabkondri</url>
		</developer>
	</developers>

	<scm>
		<connection>scm:git:git://github.com/shahabkondri/chat-gpt-api.git</connection>
		<developerConnection>scm:git:ssh://github.com:shahabkondri/chat-gpt-api.git</developerConnection>
		<url>https://github.com/shahabkondri/chat-gpt-api/tree/master</url>
	</scm>

	<issueManagement>
		<system>GitHub</system>
		<url>https://github.com/shahabkondri/chat-gpt-api/issues</url>
	</issueManagement>

	<properties>
		<java.version>17</java.version>
		<maven.compiler.source>${java.version}</maven.compiler.source>
		<maven.compiler.target>${java.version}</maven.compiler.target>

		<maven-compiler-plugin.version>3.11.0</maven-compiler-plugin.version>
		<maven-source-plugin.version>3.2.1</maven-source-plugin.version>
		<maven-javadoc-plugin.version>3.5.0</maven-javadoc-plugin.version>
		<spring-javaformat-maven-plugin.version>0.0.35</spring-javaformat-maven-plugin.version>
		<maven-checkstyle-plugin.version>3.2.1</maven-checkstyle-plugin.version>
		<checkstyle.version>10.7.0</checkstyle.version>
		<jreleaser-maven-plugin.version>1.5.1</jreleaser-maven-plugin.version>
	</properties>

	<dependencies>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-webflux</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-configuration-processor</artifactId>
			<optional>true</optional>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>${maven-compiler-plugin.version}</version>
				<configuration>
					<release>${java.version}</release>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>${maven-javadoc-plugin.version}</version>
				<executions>
					<execution>
						<id>attach-javadoc</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>${maven-source-plugin.version}</version>
				<executions>
					<execution>
						<id>attach-sources</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>io.spring.javaformat</groupId>
				<artifactId>spring-javaformat-maven-plugin</artifactId>
				<version>${spring-javaformat-maven-plugin.version}</version>
				<executions>
					<execution>
						<phase>validate</phase>
						<inherited>true</inherited>
						<goals>
							<goal>validate</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-checkstyle-plugin</artifactId>
				<version>${maven-checkstyle-plugin.version}</version>
				<dependencies>
					<dependency>
						<groupId>com.puppycrawl.tools</groupId>
						<artifactId>checkstyle</artifactId>
						<version>${checkstyle.version}</version>
					</dependency>
					<dependency>
						<groupId>io.spring.javaformat</groupId>
						<artifactId>spring-javaformat-checkstyle</artifactId>
						<version>${spring-javaformat-maven-plugin.version}</version>
					</dependency>
				</dependencies>
				<executions>
					<execution>
						<id>checkstyle-validation</id>
						<phase>validate</phase>
						<inherited>true</inherited>
						<configuration>
							<configLocation>checkstyle.xml</configLocation>
							<includeTestSourceDirectory>true</includeTestSourceDirectory>
						</configuration>
						<goals>
							<goal>check</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

	<profiles>
		<profile>
			<id>release</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.jreleaser</groupId>
						<artifactId>jreleaser-maven-plugin</artifactId>
						<version>${jreleaser-maven-plugin.version}</version>
						<configuration>
							<jreleaser>
								<project>
									<description>ChatGPT API</description>
									<website>https://github.com/shahabkondri/chat-gpt-api</website>
									<docsUrl>https://github.com/shahabkondri/chat-gpt-api</docsUrl>
									<license>MIT License</license>
									<authors>Shahab Kondri</authors>
									<copyright>2023 Shahab Kondri</copyright>
								</project>
								<signing>
									<active>ALWAYS</active>
									<armored>true</armored>
								</signing>
								<deploy>
									<maven>
										<nexus2>
											<maven-central>
												<active>ALWAYS</active>
												<url>https://s01.oss.sonatype.org/service/local</url>
												<snapshotUrl>https://s01.oss.sonatype.org/content/repositories/snapshots/</snapshotUrl>
												<closeRepository>false</closeRepository>
												<releaseRepository>false</releaseRepository>
												<stagingRepositories>target/staging-deploy</stagingRepositories>
											</maven-central>
										</nexus2>
									</maven>
								</deploy>
							</jreleaser>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

</project>
