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

	<parent>
		<groupId>com.xlrit.gears.runtime</groupId>
		<artifactId>gears-runtime-maven</artifactId>
		<version>1.2</version>
	</parent>

	<artifactId>gears-project-parent</artifactId>
	<packaging>pom</packaging>

	<name>${project.groupId}:${project.artifactId}</name>
	<description>GEARS Runtime Maven Parent Project</description>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<java.version>11</java.version>
		<start.wait>500</start.wait>
		<start.maxAttempts>60</start.maxAttempts>
		<start-class><!-- to be overridden in child project --></start-class>
	</properties>

	<dependencies>
		<dependency>
			<groupId>com.xlrit.gears.runtime</groupId>
			<artifactId>gears-runtime-common</artifactId>
		</dependency>
		<dependency>
			<groupId>com.xlrit.gears.runtime</groupId>
			<artifactId>gears-runtime-test</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.projectlombok</groupId>
			<artifactId>lombok</artifactId>
			<scope>provided</scope>
		</dependency>
	</dependencies>

	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>3.8.1</version>
					<configuration>
						<release>${java.version}</release>
						<parameters>true</parameters>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.springframework.boot</groupId>
					<artifactId>spring-boot-maven-plugin</artifactId>
					<configuration>
						<wait>${start.wait}</wait>
						<maxAttempts>${start.maxAttempts}</maxAttempts>
						<fork>true</fork>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>

	<profiles>
		<profile>
			<id>standalone</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<dependencies>
				<dependency>
					<groupId>com.xlrit.gears.runtime</groupId>
					<artifactId>gears-runtime-server</artifactId>
				</dependency>
			</dependencies>
			<build>
				<plugins>
					<plugin>
						<groupId>org.springframework.boot</groupId>
						<artifactId>spring-boot-maven-plugin</artifactId>
						<executions>
							<execution>
								<id>repackage</id>
								<goals>
									<goal>repackage</goal>
								</goals>
							</execution>
						</executions>
						<configuration>
							<mainClass>${start-class}</mainClass>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
