<!--
  ~ This file is part of Limbo.
  ~
  ~ Copyright (C) 2022. LoohpJames <jamesloohp@gmail.com>
  ~ Copyright (C) 2022. Contributors
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~     http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<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>
	<groupId>com.loohp</groupId>
	<artifactId>Limbo</artifactId>
	<name>Limbo</name>
	<version>0.7.10-ALPHA</version>
	
	<description>Standalone Limbo Minecraft Server.</description>
	<url>https://github.com/LOOHP/Limbo</url>
	<packaging>jar</packaging>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.build.number></project.build.number>
		<project.fullVersion>${project.version}</project.fullVersion>
		<maven.compiler.source>1.8</maven.compiler.source>
		<maven.compiler.target>1.8</maven.compiler.target>
	</properties>
	
	<build>
		<sourceDirectory>src/main/java</sourceDirectory>
		<resources>
			<resource>
				<directory>src/main/resources</directory>
				<filtering>true</filtering>
				<excludes>
					<exclude>**/*.java</exclude>
					<exclude>**/*.ttf</exclude>
					<exclude>**/*.jar</exclude>
					<exclude>**/*.schem</exclude>
				</excludes>
			</resource>
			<resource>
				<directory>src/main/resources</directory>
				<filtering>false</filtering>
				<includes>
					<include>**/*.ttf</include>
					<include>**/*.jar</include>
					<include>**/*.schem</include>
				</includes>
			</resource>
		</resources>
		<plugins>
			<plugin>
				<artifactId>maven-assembly-plugin</artifactId>
				<executions>
					<execution>
						<phase>package</phase>
						<goals>
							<goal>single</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<archive>
						<manifest>
							<addClasspath>true</addClasspath>
							<classpathPrefix>lib/</classpathPrefix>
							<mainClass>com.loohp.limbo.Limbo</mainClass>
						</manifest>
						<manifestEntries>
							<Limbo-Version>${project.version}</Limbo-Version>
						</manifestEntries>
					</archive>
					<descriptorRefs>
						<descriptorRef>jar-with-dependencies</descriptorRef>
					</descriptorRefs>
					<appendAssemblyId>false</appendAssemblyId>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.8.0</version>
				<configuration>
					<source>1.8</source>
					<target>1.8</target>
					<encoding>ISO-8859-1</encoding>
				</configuration>
			</plugin>

			<plugin>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>3.2.0</version>
				<configuration>
					<failOnError>false</failOnError>
					<encoding>ISO-8859-1</encoding>
					<doctitle>Limbo JavaDocs</doctitle>
					<windowtitle>Limbo JavaDocs</windowtitle>
					<additionalOptions>
						<additionalOption>-Xdoclint:none</additionalOption>
					</additionalOptions>
				</configuration>
				<executions>
					<execution>
						<phase>install</phase>
						<goals>
							<goal>aggregate</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>3.2.0</version>
				<executions>
					<execution>
						<id>attach-sources</id>
						<phase>package</phase>
						<goals>
							<goal>jar-no-fork</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
		<finalName>${project.artifactId}-${project.version}-1.21</finalName>
	</build>

	<profiles>
		<profile>
			<id>jenkins</id>
			<activation>
				<property>
					<name>env.BUILD_NUMBER</name>
				</property>
			</activation>
			<properties>
				<project.build.number>-b${env.BUILD_NUMBER}</project.build.number>
				<!--<project.fullVersion>${project.version}${project.build.number}</project.fullVersion> -->
				<project.fullVersion>${project.version}</project.fullVersion>
			</properties>
		</profile>

		<profile>
			<id>release-sign-artifacts</id>
			<activation>
				<property>
					<name>performRelease</name>
					<value>true</value>
				</property>
			</activation>
			<properties>
				<project.fullVersion>${project.version}</project.fullVersion>
			</properties>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<version>3.2.1</version>
						<configuration>
							<encoding>${project.build.sourceEncoding}</encoding>
						</configuration>
						<executions>
							<execution>
								<id>attach-sources</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>

					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<version>3.2.0</version>
						<configuration>
							<encoding>${project.build.sourceEncoding}</encoding>
						</configuration>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

	<repositories>
		<repository>
			<id>jitpack.io</id>
			<url>https://jitpack.io</url>
		</repository>
		<repository>
			<id>sonatype-oss-snapshots1</id>
			<url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
		</repository>
		<repository>
			<id>bungeecord-repo</id>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
		</repository>
		<repository>
			<id>maven_central</id>
			<name>Maven Central</name>
			<url>https://repo.maven.apache.org/maven2/</url>
		</repository>
	</repositories>

	<dependencies>
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-lang3</artifactId>
			<version>3.14.0</version>
		</dependency>
		<dependency>
			<groupId>com.github.Querz</groupId>
			<artifactId>NBT</artifactId>
			<version>5.5</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>com.google.code.gson</groupId>
			<artifactId>gson</artifactId>
			<version>2.10.1</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>org.yaml</groupId>
			<artifactId>snakeyaml</artifactId>
			<version>1.26</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>com.googlecode.json-simple</groupId>
			<artifactId>json-simple</artifactId>
			<version>1.1.1</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>net.md-5</groupId>
			<artifactId>bungeecord-chat</artifactId>
			<version>1.18-R0.1-SNAPSHOT</version>
			<type>jar</type>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>net.kyori</groupId>
			<artifactId>adventure-text-serializer-gson</artifactId>
			<version>4.17.0-SNAPSHOT</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>net.kyori</groupId>
			<artifactId>adventure-text-serializer-legacy</artifactId>
			<version>4.17.0-SNAPSHOT</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>net.kyori</groupId>
			<artifactId>adventure-text-serializer-plain</artifactId>
			<version>4.17.0-SNAPSHOT</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>net.kyori</groupId>
			<artifactId>adventure-api</artifactId>
			<version>4.17.0-SNAPSHOT</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>net.kyori</groupId>
			<artifactId>adventure-nbt</artifactId>
			<version>4.17.0-SNAPSHOT</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>org.fusesource.jansi</groupId>
			<artifactId>jansi</artifactId>
			<version>1.18</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>org.jline</groupId>
			<artifactId>jline</artifactId>
			<version>3.16.0</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>jline</groupId>
			<artifactId>jline</artifactId>
			<version>2.11</version>
			<scope>compile</scope>
		</dependency>
	</dependencies>

</project>
