<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- JBoss, Home of Professional Open Source Copyright 2017, Red Hat, Inc. 
	and/or its affiliates, and individual contributors by the @authors tag. See 
	the copyright.txt in the distribution for a full listing of individual 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 http://maven.apache.org/xsd/maven-4.0.0.xsd">

	<modelVersion>4.0.0</modelVersion>

	<artifactId>sap-qrfc-destination-spring-boot</artifactId>

	<name>Spring Boot Queued RFC Destination Example</name>
	<description>This Quick Start demonstrates how to use the JBoss Fuse SAP Queueud RFC Destination endpoint.</description>
	<url>http://http://www.jboss.org/products/fuse/overview/</url>
	<parent>
		<groupId>com.redhat.quickstarts.fuse</groupId>
		<artifactId>sap-quickstarts-parent</artifactId>
		<version>3.20.1.redhat-00001</version>
		<relativePath>../../pom.xml</relativePath>
	</parent>
	<properties>
		<main.class>com.redhat.quickstarts.fuse.sap_qrfc_destination_spring_boot.Application</main.class>
	</properties>
	<dependencies>
		<dependency>
			<groupId>org.apache.camel.springboot</groupId>
			<artifactId>camel-core-starter</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-web</artifactId>
			<exclusions>
				<exclusion>
					<groupId>org.springframework.boot</groupId>
					<artifactId>spring-boot-starter-tomcat</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-undertow</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.camel.springboot</groupId>
			<artifactId>camel-spring-boot-starter</artifactId>
		</dependency>
		<dependency>
			<groupId>org.fusesource</groupId>
			<artifactId>camel-sap-starter</artifactId>
		</dependency>
		<dependency>
			<groupId>com.sap.conn.jco</groupId>
			<artifactId>sapjco3</artifactId>
			<version>${sapjco3-version}</version>
			<scope>system</scope>
			<systemPath>${basedir}/lib/sapjco3.jar</systemPath>
		</dependency>
		<dependency>
			<groupId>com.sap.conn.idoc</groupId>
			<artifactId>sapidoc3</artifactId>
			<version>${sapidoc3-version}</version>
			<scope>system</scope>
			<systemPath>${basedir}/lib/sapidoc3.jar</systemPath>
		</dependency>
	</dependencies>
	<build>
		<defaultGoal>spring-boot:run</defaultGoal>
		<resources>
			<resource>
				<directory>src/main/resources</directory>
				<filtering>true</filtering>
			</resource>
		</resources>

		<plugins>

			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<source>${maven.compiler.source}</source>
					<target>${maven.compiler.target}</target>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-resources-plugin</artifactId>
				<configuration>
					<outputDirectory>${project.build.directory}/classes</outputDirectory>
					<resources>
						<resource>
							<directory>src/main/resources</directory>
							<includes>
								<include>application.properties</include>
							</includes>
							<filtering>true</filtering>
						</resource>
						<resource>
							<directory>src/main/resources</directory>
							<includes>
								<include>classpath</include>
							</includes>
							<filtering>true</filtering>
						</resource>
					</resources>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.camel</groupId>
				<artifactId>camel-maven-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-maven-plugin</artifactId>
				<executions>
					<execution>
						<goals>
							<goal>repackage</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
	<profiles>
		<profile>
			<id>openshift</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.eclipse.jkube</groupId>
						<artifactId>openshift-maven-plugin</artifactId>
						<configuration>
							<resources>
								<controller>
									<env>
										<AB_PROMETHEUS_OFF>true</AB_PROMETHEUS_OFF>
										<AB_JOLOKIA_OFF>true</AB_JOLOKIA_OFF>
										<AB_ENABLED>false</AB_ENABLED>
										<JAVA_MAIN_CLASS>org.springframework.boot.loader.PropertiesLauncher</JAVA_MAIN_CLASS>
										<JAVA_OPTIONS>-Dloader.main=${main.class}</JAVA_OPTIONS>
									</env>
								</controller>
							</resources>
							<images>
								<image>
									<name>camel/actuator-http-metric</name>
									<build>
										<from>quay.io/jkube/jkube-java:0.0.19</from>
										<assembly>
											<mode>dir</mode>
											<targetDir>/deployments</targetDir>
											<layers>
												<layer>
													<id>lib</id>
													<fileSets>
														<fileSet>
															<directory>${project.build.directory}/classes</directory>
															<outputDirectory>.</outputDirectory>
															<fileMode>0640</fileMode>
															<includes>classpath</includes>
														</fileSet>
														<fileSet>
															<directory>${project.basedir}/lib</directory>
															<outputDirectory>lib</outputDirectory>
															<fileMode>0640</fileMode>
														</fileSet>
													</fileSets>
												</layer>
											</layers>
										</assembly>
										<ports>
											<port>8080</port>
										</ports>
									</build>
								</image>
							</images>
						</configuration>
						<executions>
							<execution>
								<goals>
									<goal>resource</goal>
									<goal>build</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
