<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"
		 xmlns="http://maven.apache.org/POM/4.0.0"
		 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<modelVersion>4.0.0</modelVersion>
	<parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>{{app.springBootVersion}}</version>
		<relativePath></relativePath>
	</parent>
	<groupId>{{app.groupId}}</groupId>
	<artifactId>{{app.name}}-{{app.type}}-{{app-binder.name}}</artifactId>
	<version>{{app.version}}</version>
	<name>{{app.name}}-{{app.type}}-{{app-binder.name}}</name>
	<description>Spring Cloud Stream {{#camelCase}}{{app.name}}{{/camelCase}} {{#capitalize}}{{app.type}}{{/capitalize}} {{#capitalize}}{{app-binder.name}}{{/capitalize}} Binder Application
	</description>

	<distributionManagement>
		<repository>
			<id>repo.spring.io</id>
			<name>Spring Release Repository</name>
			<url>https://repo.spring.io/libs-release-local;buildName=${buildName};buildNumber=${buildNumber}</url>
		</repository>
		<snapshotRepository>
			<id>repo.spring.io</id>
			<name>Spring Snapshot Repository</name>
			<url>https://repo.spring.io/libs-snapshot-local;buildName=${buildName};buildNumber=${buildNumber}</url>
		</snapshotRepository>
	</distributionManagement>

	<properties>
		<skipTests>true</skipTests>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<maven-javadoc-plugin.version>3.5.0</maven-javadoc-plugin.version>
		<maven-source-plugin.version>3.2.1</maven-source-plugin.version>
		<!-- (begin) maven properties -->
		{{#app.maven.properties}}
		{{this}}
		{{/app.maven.properties}}

		{{#app-binder.maven.properties}}
		{{this}}
		{{/app-binder.maven.properties}}
		<!-- (end) maven properties -->
		<buildName>${env.BUILD_NAME}</buildName>
		<buildNumber>${env.BUILD_NUMBER}</buildNumber>
	</properties>

	<dependencyManagement>
		<dependencies>
			<!-- (begin) managed dependencies -->
			{{#app-binder.maven.dependencyManagement}}
			{{this}}
			{{/app-binder.maven.dependencyManagement}}

			{{#app.maven.dependencyManagement}}
			{{this}}
			{{/app.maven.dependencyManagement}}
			<!-- (end) managed dependencies -->
		</dependencies>
	</dependencyManagement>

	<dependencies>
		<!-- (begin) additional dependencies -->
		{{#app.maven.dependencies}}
		{{this}}
		{{/app.maven.dependencies}}

		{{#app-binder.maven.dependencies}}
		{{this}}
		{{/app-binder.maven.dependencies}}
		<!-- (end) additional dependencies -->
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-test</artifactId>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<repositories>
		<!-- (begin) additional repositories -->
		{{#app.maven.repositories}}
		{{this}}
		{{/app.maven.repositories}}

		{{#app-binder.maven.repositories}}
		{{this}}
		{{/app-binder.maven.repositories}}
		<!-- (end) additional repositories -->

		<repository>
			<snapshots>
				<enabled>true</enabled>
			</snapshots>
			<id>spring-snapshots</id>
			<name>Spring Snapshots</name>
			<url>https://repo.spring.io/snapshot</url>
		</repository>
		<repository>
			<snapshots>
				<enabled>false</enabled>
			</snapshots>
			<id>spring-milestones</id>
			<name>Spring Milestones</name>
			<url>https://repo.spring.io/milestone</url>
		</repository>
	</repositories>
	<pluginRepositories>
		<pluginRepository>
			<snapshots>
				<enabled>true</enabled>
			</snapshots>
			<id>spring-snapshots</id>
			<name>Spring Snapshots</name>
			<url>https://repo.spring.io/snapshot</url>
		</pluginRepository>
		<pluginRepository>
			<snapshots>
				<enabled>false</enabled>
			</snapshots>
			<id>spring-milestones</id>
			<name>Spring Milestones</name>
			<url>https://repo.spring.io/milestone</url>
		</pluginRepository>
	</pluginRepositories>
	<build>
		<plugins>
			<!-- (begin) additional plugins -->
			{{#app.maven.plugins}}
			{{this}}
			{{/app.maven.plugins}}

			{{#app-binder.maven.plugins}}
			{{this}}
			{{/app-binder.maven.plugins}}
			<!-- (end) additional plugins -->
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                {{#app.bootPluginConfiguration}}
                <configuration>
                    {{this}}
                </configuration>
                {{/app.bootPluginConfiguration}}
            </plugin>

			{{#app.containerImage.enableMetadata}}
			<!--
			 Use of properties-maven-plugin to load the encoded metadata properties
			-->
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>properties-maven-plugin</artifactId>
				<version>1.0.0</version>
				<executions>
					<execution>
						<phase>process-classes</phase>
						<goals>
							<goal>read-project-properties</goal>
						</goals>
						<configuration>
							<files>
								<file>
									${project.build.outputDirectory}/META-INF/spring-configuration-metadata-encoded.properties
								</file>
							</files>
						</configuration>
					</execution>
				</executions>
			</plugin>
			{{/app.containerImage.enableMetadata}}

			<plugin>
				<groupId>org.springframework.cloud</groupId>
				<artifactId>spring-cloud-dataflow-apps-metadata-plugin</artifactId>
				<version>{{app.metadata.mavenPluginVersion}}</version>
				<configuration>
					{{#app.containerImage.enableMetadata}}
					<storeFilteredMetadata>true</storeFilteredMetadata>
					<metadataFilter>
						<names>
							{{#app.metadataNameFilters}}
							<filter>{{this}}</filter>
							{{/app.metadataNameFilters}}
						</names>
						<sourceTypes>
							{{#app.metadata.sourceTypeFilters}}
							<filter>{{this}}</filter>
							{{/app.metadata.sourceTypeFilters}}
						</sourceTypes>
					</metadataFilter>
					{{/app.containerImage.enableMetadata}}
				</configuration>
				<executions>
					<execution>
						<id>aggregate-metadata</id>
						<phase>compile</phase>
						<goals>
							<goal>aggregate-metadata</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>3.0.0</version>
				<configuration>
					<threadCount>1</threadCount>
					<forkCount>1</forkCount>
					<skipTests>${skipTests}</skipTests>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>${maven-javadoc-plugin.version}</version>
				<executions>
					<execution>
						<id>javadoc</id>
						<phase>package</phase>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<quiet>true</quiet>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-source-plugin</artifactId>
				<version>${maven-source-plugin.version}</version>
				<executions>
					<execution>
						<id>attach-sources</id>
						<phase>package</phase>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
	<profiles>
		<profile>
			<id>milestone</id>
			<distributionManagement>
				<repository>
					<id>repo.spring.io</id>
					<name>Spring Milestone Repository</name>
					<url>https://repo.spring.io/libs-milestone-local;buildName=${buildName};buildNumber=${buildNumber}</url>
				</repository>
			</distributionManagement>
		</profile>
	</profiles>
</project>
