<?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>

	<groupId>{{groupId}}</groupId>
	<artifactId>{{artifactId}}</artifactId>
	<version>{{version}}</version>
	<packaging>{{packaging}}</packaging>

	<name>{{name}}</name>
	<description>{{description}}</description>

	<parent>
		<groupId>{{mavenParentGroupId}}</groupId>
		<artifactId>{{mavenParentArtifactId}}</artifactId>
		<version>{{mavenParentVersion}}</version>
		<relativePath/> <!-- lookup parent from repository -->
	</parent>

	<properties>
		{{#buildPropertiesMaven}}
		<{{key}}>{{#value}}{{.}}{{/value}}</{{key}}>
		{{/buildPropertiesMaven}}
		{{#buildPropertiesVersions}}
		<{{key}}>{{#value}}{{.}}{{/value}}</{{key}}>
		{{/buildPropertiesVersions}}
	</properties>

	<dependencies>
		{{#compileDependencies}}
		<dependency>
			<groupId>{{groupId}}</groupId>
			<artifactId>{{artifactId}}</artifactId>
			{{#version}}
			<version>{{version}}</version>
			{{/version}}
			{{#type}}
			<type>{{type}}</type>
			{{/type}}
		</dependency>
		{{/compileDependencies}}
		{{#groovy}}
		<dependency>
			<groupId>org.codehaus.groovy</groupId>
			<artifactId>groovy</artifactId>
		</dependency>
		{{/groovy}}
		{{#kotlin}}
		<dependency>
			<groupId>org.jetbrains.kotlin</groupId>
			{{#isJava6}}
			<artifactId>kotlin-stdlib</artifactId>
			{{/isJava6}}
			{{#isJava7}}
			<artifactId>kotlin-stdlib-jre7</artifactId>
			{{/isJava7}}
			{{#isJava8}}
			<artifactId>kotlin-stdlib-jre8</artifactId>
			{{/isJava8}}
			<version>${kotlin.version}</version>
		</dependency>
		<dependency>
			<groupId>org.jetbrains.kotlin</groupId>
			<artifactId>kotlin-reflect</artifactId>
			<version>${kotlin.version}</version>
		</dependency>
		{{/kotlin}}

		{{#runtimeDependencies}}
		<dependency>
			<groupId>{{groupId}}</groupId>
			<artifactId>{{artifactId}}</artifactId>
			{{#version}}
			<version>{{version}}</version>
			{{/version}}
			<scope>runtime</scope>
			{{#type}}
			<type>{{type}}</type>
			{{/type}}
		</dependency>
		{{/runtimeDependencies}}
		{{#compileOnlyDependencies}}
		<dependency>
			<groupId>{{groupId}}</groupId>
			<artifactId>{{artifactId}}</artifactId>
			{{#version}}
			<version>{{version}}</version>
			{{/version}}
			<optional>true</optional>
			{{#type}}
			<type>{{type}}</type>
			{{/type}}
		</dependency>
		{{/compileOnlyDependencies}}
		{{#providedDependencies}}
		<dependency>
			<groupId>{{groupId}}</groupId>
			<artifactId>{{artifactId}}</artifactId>
			{{#version}}
			<version>{{version}}</version>
			{{/version}}
			<scope>provided</scope>
			{{#type}}
			<type>{{type}}</type>
			{{/type}}
		</dependency>
		{{/providedDependencies}}
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-test</artifactId>
			<scope>test</scope>
		</dependency>
		{{#testDependencies}}
		<dependency>
			<groupId>{{groupId}}</groupId>
			<artifactId>{{artifactId}}</artifactId>
			{{#version}}
			<version>{{version}}</version>
			{{/version}}
			<scope>test</scope>
			{{#type}}
			<type>{{type}}</type>
			{{/type}}
		</dependency>
		{{/testDependencies}}
	</dependencies>
{{#hasBoms}}

	<dependencyManagement>
		<dependencies>
		    {{#resolvedBoms}}
			<dependency>
				<groupId>{{groupId}}</groupId>
				<artifactId>{{artifactId}}</artifactId>
				<version>{{versionToken}}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
			{{/resolvedBoms}}
		</dependencies>
	</dependencyManagement>
{{/hasBoms}}

	<build>
		{{#kotlin}}
		<sourceDirectory>${project.basedir}/src/main/kotlin</sourceDirectory>
		<testSourceDirectory>${project.basedir}/src/test/kotlin</testSourceDirectory>
		{{/kotlin}}
		<plugins>
			<plugin>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-maven-plugin</artifactId>
			</plugin>
			{{#groovy}}
			<plugin>
				<groupId>org.codehaus.gmavenplus</groupId>
				<artifactId>gmavenplus-plugin</artifactId>
				<version>1.5</version>
				<executions>
					<execution>
						<goals>
							<goal>addSources</goal>
							<goal>addTestSources</goal>
							<goal>generateStubs</goal>
							<goal>compile</goal>
							<goal>testGenerateStubs</goal>
							<goal>testCompile</goal>
							<goal>removeStubs</goal>
							<goal>removeTestStubs</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			{{/groovy}}
			{{#kotlin}}
			<plugin>
				<artifactId>kotlin-maven-plugin</artifactId>
				<groupId>org.jetbrains.kotlin</groupId>
				<version>${kotlin.version}</version>
				<configuration>
					<compilerPlugins>
						<plugin>spring</plugin>
					</compilerPlugins>
					{{#isJava8}}
					<jvmTarget>1.8</jvmTarget>
					{{/isJava8}}
				</configuration>
				<executions>
					<execution>
						<id>compile</id>
						<phase>compile</phase>
						<goals>
							<goal>compile</goal>
						</goals>
					</execution>
					<execution>
						<id>test-compile</id>
						<phase>test-compile</phase>
						<goals>
							<goal>test-compile</goal>
						</goals>
					</execution>
				</executions>
				<dependencies>
					<dependency>
						<groupId>org.jetbrains.kotlin</groupId>
						<artifactId>kotlin-maven-allopen</artifactId>
						<version>${kotlin.version}</version>
					</dependency>
				</dependencies>
			</plugin>
			{{/kotlin}}
		</plugins>
	</build>
{{#hasRepositories}}

	<repositories>
		{{#repositoryValues}}
		<repository>
			<id>{{key}}</id>
			<name>{{value.name}}</name>
			<url>{{value.url}}</url>
			<snapshots>
				<enabled>{{value.snapshotsEnabled}}</enabled>
			</snapshots>
		</repository>
		{{/repositoryValues}}
	</repositories>
{{/hasRepositories}}
{{^isRelease}}

	<pluginRepositories>
		<pluginRepository>
			<id>spring-snapshots</id>
			<name>Spring Snapshots</name>
			<url>https://repo.spring.io/snapshot</url>
			<snapshots>
				<enabled>true</enabled>
			</snapshots>
		</pluginRepository>
		<pluginRepository>
			<id>spring-milestones</id>
			<name>Spring Milestones</name>
			<url>https://repo.spring.io/milestone</url>
			<snapshots>
				<enabled>false</enabled>
			</snapshots>
		</pluginRepository>
	</pluginRepositories>
{{/isRelease}}


</project>
