<?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>com.github.elkouhen</groupId>
	<artifactId>fabric8-poc</artifactId>
	<version>1.0.9</version>
	
	<parent>
		<groupId>io.fabric8.jube.images.fabric8</groupId>
		<artifactId>quickstart-java</artifactId>
		<version>2.0.10</version>
	</parent>

	<scm>
		<connection>scm:git:https://github.com/elkouhen/fabric8-poc.git</connection>
		<developerConnection>scm:git:https://github.com/elkouhen/fabric8-poc.git</developerConnection>
		<url>https://github.com/elkouhen/fabric8-poc.git</url>
		<tag>fabric8-poc-1.0.9</tag>
	</scm>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<version.compiler.plugin>2.3.1</version.compiler.plugin>
		<version.maven-bundle-plugin>2.3.7</version.maven-bundle-plugin>
		<maven.compiler.target>1.7</maven.compiler.target>
		<maven.compiler.source>1.7</maven.compiler.source>

		<!-- the version of the BOM, defining all the dependency versions -->
		<fabric8.version>2.0.10</fabric8.version>

		<!-- versions for use in mvn plugins as we cannot inherit them from a BOM -->
		<jube.version>2.0.10</jube.version>

		<docker.from>fabric8/java</docker.from>
		<docker.registryPrefix>${env.DOCKER_REGISTRY}/</docker.registryPrefix>
		<docker.image>${docker.registryPrefix}fabric8/${project.artifactId}:${project.version}</docker.image>
		<docker.assemblyDescriptorRef>artifact-with-dependencies</docker.assemblyDescriptorRef>
		<docker.port.container.jolokia>8778</docker.port.container.jolokia>
		<docker.env.MAIN>com.mycompany.poc.springboot.config.AppConfig</docker.env.MAIN>

		<docker.maven.plugin.version>0.10.4</docker.maven.plugin.version>

		<fabric8.label.container>java</fabric8.label.container>
		<fabric8.label.group>quickstarts</fabric8.label.group>
	</properties>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<!-- Import dependency management from Spring Boot -->
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-dependencies</artifactId>
				<version>1.1.9.RELEASE</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
			<dependency>
				<groupId>io.fabric8</groupId>
				<artifactId>fabric8-project</artifactId>
				<version>${fabric8.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<dependencies>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-web</artifactId>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-maven-plugin</artifactId>
				<version>1.1.9.RELEASE</version>
				<configuration>
					<mainClass>com.mycompany.poc.springboot.config.AppConfig</mainClass>
					<!--<mainClass>io.fabric8.process.spring.boot.container.FabricSpringApplication</mainClass>-->
				</configuration>
				<executions>
					<execution>
						<goals>
							<goal>repackage</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>io.fabric8</groupId>
				<artifactId>fabric8-maven-plugin</artifactId>
				<version>${fabric8.version}</version>
				<executions>
					<execution>
						<id>json</id>
						<goals>
							<goal>json</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.jolokia</groupId>
				<artifactId>docker-maven-plugin</artifactId>
				<version>${docker.maven.plugin.version}</version>
				<configuration>
					<images>
						<image>
							<name>${docker.image}</name>
							<build>
								<from>${docker.from}</from>
								<assemblyDescriptorRef>${docker.assemblyDescriptorRef}</assemblyDescriptorRef>
								<env>
									<MAIN>${docker.env.MAIN}</MAIN>
								</env>
							</build>
						</image>
					</images>
				</configuration>
			</plugin>
			<plugin>
				<groupId>io.fabric8.jube</groupId>
				<artifactId>jube-maven-plugin</artifactId>
				<version>${jube.version}</version>
			</plugin>
			<plugin>
				<artifactId>maven-deploy-plugin</artifactId>
				<version>2.8.1</version>
				<executions>
					<execution>
						<id>default-deploy</id>
						<phase>deploy</phase>
						<goals>
							<goal>deploy</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.sonatype.plugins</groupId>
				<artifactId>nexus-staging-maven-plugin</artifactId>
				<version>1.6.3</version>
				<extensions>true</extensions>
				<configuration>
					<serverId>ossrh</serverId>
					<nexusUrl>https://oss.sonatype.org/</nexusUrl>
					<autoReleaseAfterClose>true</autoReleaseAfterClose>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>2.2.1</version>
				<executions>
					<execution>
						<id>attach-sources</id>
						<goals>
							<goal>jar-no-fork</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>2.9.1</version>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-gpg-plugin</artifactId>
				<version>1.5</version>
				<executions>
					<execution>
						<id>sign-artifacts</id>
						<phase>verify</phase>
						<goals>
							<goal>sign</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
				<version>2.5</version>
				<configuration>
					<autoVersionSubmodules>true</autoVersionSubmodules>
					<useReleaseProfile>false</useReleaseProfile>
					<releaseProfiles>release</releaseProfiles>
					<goals>deploy</goals>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<distributionManagement>
		<snapshotRepository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
		<repository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/service/local/staging/deploy/maven</url>
		</repository>
	</distributionManagement>

</project>
