<?xml version="1.0"?>
<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>
	<prerequisites>
		<maven>3.1</maven>
	</prerequisites>

	<groupId>com.sap.cloud.yaas.service-sdk</groupId>
	<artifactId>service-sdk-project</artifactId>
	<version>4.7.0</version>

	<packaging>pom</packaging>

	<name>Service SDK</name>
	<description>Service SDK enables to develop services quickly by providing a number of helper libraries, archetypes, plugins as well as client and service side code generation</description>
	
	<url>http://yaas.io</url>
	<inceptionYear>2015</inceptionYear>
	<issueManagement>
		<system>JIRA</system>
		<url>https://jira.hybris.com/browse/CFB</url>
	</issueManagement>
	<licenses>
		<license>
			<name>SAP DEVELOPER LICENSE AGREEMENT</name>
			<url>https://tools.hana.ondemand.com/developer-license-3.1.txt</url>
			<distribution>repo</distribution>
		</license>
	</licenses>
	<developers>
		<developer>
			<name>YaaS</name>
			<organization>SAP SE</organization>
			<organizationUrl>http://www.sap.com</organizationUrl>
		</developer>
	</developers>
	<organization>
		<name>SAP SE</name>
		<url>http://www.sap.com</url>
	</organization>
	
	<modules>
		<module>service-sdk-libraries-project</module>
		<module>service-sdk-plugins</module>
		<module>service-sdk-superpoms/service-sdk-superpom</module>
		<module>service-sdk-superpoms/service-sdk-superpom-internal</module>
		<module>service-sdk-archetypes/service-sdk-jersey-spring-archetype</module>
		<module>service-sdk-integration-test</module>
		<module>service-sdk-utilities/service-sdk-api-designer</module>
		<module>service-sdk-utilities/service-sdk-raml-rewriter-runner</module>
	</modules>

	<properties>
		<!-- settings -->
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<maven.junit.jvmargs>-Xmx512m</maven.junit.jvmargs>
		<maven.compiler.source>1.8</maven.compiler.source>
		<maven.compiler.target>1.8</maven.compiler.target>
		<maven.build.timestamp.format>E MMM dd yyyy HH:MM:SS zzz Z</maven.build.timestamp.format>
		<versioneye.projectId>55c20a956631360047005214</versioneye.projectId>
		
		<!-- hybris project versions -->
		<service.generator.version>2.2.1</service.generator.version>
		<raml.parser.version>1.0.2</raml.parser.version>
		<rammler.version>1.6.0</rammler.version>

		<!-- plugin versions -->
		<maven.compiler.plugin.version>3.3</maven.compiler.plugin.version>
		<maven.jar.plugin.version>2.6</maven.jar.plugin.version>
		<maven.war.plugin.version>2.6</maven.war.plugin.version>
		<maven.surefire.plugin.version>2.19</maven.surefire.plugin.version>
		<maven.source.plugin.version>2.4</maven.source.plugin.version>
		<maven.javadoc.plugin.version>2.10.3</maven.javadoc.plugin.version>
		<maven.install.plugin.version>2.5.2</maven.install.plugin.version>
		<maven.deploy.plugin.version>2.8.2</maven.deploy.plugin.version>
		<maven.release.plugin.version>2.5.3</maven.release.plugin.version>
		<maven.resources.plugin.version>2.7</maven.resources.plugin.version>
		<maven.site.plugin.version>3.4</maven.site.plugin.version>
		<maven.clean.plugin.version>3.0.0</maven.clean.plugin.version>
		<maven.help.plugin.version>2.2</maven.help.plugin.version>
		<maven.assembly.plugin.version>2.6</maven.assembly.plugin.version>
		<tomcat.plugin.version>2.2</tomcat.plugin.version>
		<jetty.plugin.version>9.3.6.v20151106</jetty.plugin.version>
		<versioneye.plugin.version>3.5.1</versioneye.plugin.version>
		<maven.checkstyle.plugin.version>2.17</maven.checkstyle.plugin.version>
		<maven.pmd.plugin.version>3.5</maven.pmd.plugin.version>
		<maven.findbugs.plugin.version>3.0.3</maven.findbugs.plugin.version>
		<jacoco.maven.plugin.version>0.7.5.201505241946</jacoco.maven.plugin.version>
		<build.helper.maven.plugin.version>1.10</build.helper.maven.plugin.version>
		<maven.eclipse.plugin.version>2.7</maven.eclipse.plugin.version> <!-- 2.7 is latest version supporting m2e (eclipse:m2eclipse goal) -->

		<!-- library versions -->
		<spring.version>4.2.2.RELEASE</spring.version>
		<slf4j.version>1.7.12</slf4j.version>
		<jaxrs.version>2.0.1</jaxrs.version>
		<jersey.version>2.22.1</jersey.version>
		<jackson.version>2.5.4</jackson.version> <!-- not necessarily the latest one, but matching the jersey.version -->
		<javax.servlet.version>3.1.0</javax.servlet.version>
		<commons.io.version>2.4</commons.io.version>
		<commons.lang3.version>3.4</commons.lang3.version>
		<cors.filter.version>2.4</cors.filter.version>
		<guava.version>16.0.1</guava.version> <!-- not necessarily the latest one, but matching guava versions in other libraries -->
		<hystrix.version>1.4.18</hystrix.version>
		<rxjava.version>1.0.15</rxjava.version>
		<maven.mojo.executor.version>2.2.0</maven.mojo.executor.version>

		<!-- test library versions -->
		<junit.version>4.12</junit.version>
		<mockito.version>1.10.19</mockito.version>
		<fest.assert.version>1.4</fest.assert.version>
		<mock.server.version>3.9.17</mock.server.version>
	</properties>

	<scm>
		<connection>scm:git:ssh://stash.hybris.com/paas/service-sdk.git</connection>
		<developerConnection>scm:git:ssh://stash.hybris.com/paas/service-sdk.git</developerConnection>
		<url />
		<tag>v4.7.0</tag>
	</scm>

	<distributionManagement>
		<repository>
			<id>yaas-public-release</id>
			<url>https://repository.hybris.com/yaas-public-release</url>
		</repository>
		<snapshotRepository>
			<id>yaas-snapshot</id>
			<url>https://repository.hybris.com/yaas-snapshot</url>
		</snapshotRepository>
	</distributionManagement>

	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>${maven.compiler.plugin.version}</version>
					<configuration>
						<source>${maven.compiler.source}</source>
						<target>${maven.compiler.target}</target>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>${maven.javadoc.plugin.version}</version>
					<configuration>
						<additionalparam>-Xdoclint:none</additionalparam>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-resources-plugin</artifactId>
					<version>${maven.resources.plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-source-plugin</artifactId>
					<version>${maven.source.plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-jar-plugin</artifactId>
					<version>${maven.jar.plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-war-plugin</artifactId>
					<version>${maven.war.plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-install-plugin</artifactId>
					<version>${maven.install.plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-deploy-plugin</artifactId>
					<version>${maven.deploy.plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-release-plugin</artifactId>
					<version>${maven.release.plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>${maven.surefire.plugin.version}</version>
					<configuration>
						<systemPropertyVariables>
							<http.proxyPort>${http.proxyPort}</http.proxyPort>
							<http.proxyHost>${http.proxyHost}</http.proxyHost>
							<https.proxyPort>${https.proxyPort}</https.proxyPort>
							<https.proxyHost>${https.proxyHost}</https.proxyHost>
						</systemPropertyVariables>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-assembly-plugin</artifactId>
					<version>${maven.assembly.plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-clean-plugin</artifactId>
					<version>${maven.clean.plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-site-plugin</artifactId>
					<version>${maven.site.plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-help-plugin</artifactId>
					<version>${maven.help.plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>build-helper-maven-plugin</artifactId>
					<version>${build.helper.maven.plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>com.versioneye</groupId>
					<artifactId>versioneye-maven-plugin</artifactId>
					<version>${versioneye.plugin.version}</version>
					<configuration>
						<baseUrl>https://versioneye.hybris.com</baseUrl>
						<apiKey>${versioneye.apiKey}</apiKey>
						<mergeAfterCreate>true</mergeAfterCreate>
						<updatePropertiesAfterCreate>false</updatePropertiesAfterCreate>
						<projectId>${versioneye.projectId}</projectId>
						<skipScopes>test</skipScopes>
					</configuration>
				</plugin>
				<!-- Use common Eclipse settings -->
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-eclipse-plugin</artifactId>
					<version>${maven.eclipse.plugin.version}</version>
					<configuration>
						<additionalBuildcommands>
							<buildCommand>
								<name>org.eclipse.m2e.core.maven2Builder</name>
							</buildCommand>
							<buildCommand>
								<name>org.springframework.ide.eclipse.core.springbuilder</name>
							</buildCommand>
						</additionalBuildcommands>
						<additionalProjectnatures>
							<projectnature>org.eclipse.m2e.core.maven2Nature</projectnature>
							<projectnature>org.springframework.ide.eclipse.core.springnature</projectnature>
						</additionalProjectnatures>
						<sourceInclusions>
							<sourceInclusion>target/generated-sources/hybris/**</sourceInclusion>
						</sourceInclusions>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>

	<profiles>
		<profile>
			<id>qa</id>
			<build>
				<pluginManagement>
					<plugins>
						<plugin>
							<groupId>org.jacoco</groupId>
							<artifactId>jacoco-maven-plugin</artifactId>
							<version>${jacoco.maven.plugin.version}</version>
							<configuration>
								<includes>
									<include>com.sap.cloud.yaas.*</include>
								</includes>
							</configuration>
						</plugin>
						<plugin>
							<groupId>org.apache.maven.plugins</groupId>
							<artifactId>maven-checkstyle-plugin</artifactId>
							<version>${maven.checkstyle.plugin.version}</version>
							<configuration>
								<includeTestSourceDirectory>true</includeTestSourceDirectory>
								<configLocation>checkstyle.xml</configLocation>
								<propertyExpansion>config_loc=${project.basedir}</propertyExpansion>
							</configuration>
						</plugin>
						<plugin>
							<groupId>org.codehaus.mojo</groupId>
							<artifactId>findbugs-maven-plugin</artifactId>
							<version>${maven.findbugs.plugin.version}</version>
							<configuration>
								<effort>Max</effort>
								<failOnError>false</failOnError>
								<excludeFilterFile>${project.basedir}/findbugs.xml</excludeFilterFile>
							</configuration>
						</plugin>
						<plugin>
							<groupId>org.apache.maven.plugins</groupId>
							<artifactId>maven-pmd-plugin</artifactId>
							<version>${maven.pmd.plugin.version}</version>
							<configuration>
								<linkXRef>false</linkXRef>
								<includeTests>true</includeTests>
								<rulesets>
									<ruleset>ruleset.xml</ruleset>
								</rulesets>
								<sourceEncoding>${project.build.sourceEncoding}</sourceEncoding>
								<targetJdk>${maven.compiler.source}</targetJdk>
								<targetDirectory>${project.build.directory}</targetDirectory>
								<outputDirectory>${project.reporting.outputDirectory}</outputDirectory>
								<excludeRoots>
									<excludeRoot>target/generated-sources/xjc</excludeRoot>
									<excludeRoot>target/generated-sources/hybris</excludeRoot>
								</excludeRoots>
							</configuration>
						</plugin>
					</plugins>
				</pluginManagement>
				<plugins>
					<plugin>
						<groupId>org.jacoco</groupId>
						<artifactId>jacoco-maven-plugin</artifactId>
						<executions>
							<execution>
								<id>hybris.jacoco.prepare</id>
								<goals>
									<goal>prepare-agent</goal>
								</goals>
							</execution>
							<execution>
								<id>hybris.jacoco.report</id>
								<goals>
									<goal>report</goal>
								</goals>
							</execution>
							<execution>
								<id>hybris.jacoco.prepare.integration</id>
								<goals>
									<goal>prepare-agent-integration</goal>
								</goals>
							</execution>
							<execution>
								<id>hybris.jacoco.report.integration</id>
								<goals>
									<goal>report-integration</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-checkstyle-plugin</artifactId>
						<executions>
							<execution>
								<id>hybris.checkstyle</id>
								<phase>verify</phase>
								<goals>
									<goal>checkstyle</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>findbugs-maven-plugin</artifactId>
						<executions>
							<execution>
								<id>hybris.findbugs</id>
								<phase>verify</phase>
								<goals>
									<goal>check</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-pmd-plugin</artifactId>
						<executions>
							<execution>
								<id>hybris.pmd</id>
								<phase>verify</phase>
								<goals>
									<goal>pmd</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>sonar</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<properties>
				<sonar.login.user />
				<sonar.login.password />
				<sonar.branch />
				<sonar.projectDescription>Service SDK Project</sonar.projectDescription>
				<sonar.buildbreaker.skip>false</sonar.buildbreaker.skip>
				<sonar.jdbc.url>jdbc:mysql://sql.fra.hybris.com:3306/sonar?useUnicode=true&amp;characterEncoding=utf8</sonar.jdbc.url>
				<sonar.login>${sonar.login.user}</sonar.login>
				<sonar.password>${sonar.login.password}</sonar.password>
				<sonar.host.url>https://sonar.hybris.com</sonar.host.url>
			</properties>
		</profile>
		<profile>
			<id>versioneye</id>
			<build>
				<plugins>
					<plugin>
						<groupId>com.versioneye</groupId>
						<artifactId>versioneye-maven-plugin</artifactId>
						<executions>
							<execution>
								<phase>verify</phase>
								<goals>
									<goal>licenseCheck</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>deploy-nexus</id>
			<properties>
				<metadata.source.directory>${project.basedir}/src/metadata</metadata.source.directory>
				<metadata.target.directory>${project.build.directory}/metadata</metadata.target.directory>
				<metadata.groupId>${project.groupId}</metadata.groupId>
				<metadata.artifactId>${project.artifactId}</metadata.artifactId>
				<metadata.version>${project.version}</metadata.version>
			</properties>
			
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-help-plugin</artifactId>
						<inherited>false</inherited>
						<executions>
							<execution>
								<id>create-settings-artifact</id>
								<phase>package</phase>
								<goals>
									<goal>effective-settings</goal>
								</goals>
								<configuration>
									<output>${metadata.target.directory}/releaseMetadata/effective-settings.xml</output>
								</configuration>
							</execution>
							<execution>
								<id>create-pom-artifact</id>
								<phase>package</phase>
								<goals>
									<goal>effective-pom</goal>
								</goals>
								<configuration>
									<output>${metadata.target.directory}/releaseMetadata/effective-pom.xml</output>
								</configuration>
							</execution>
							<execution>
								<id>create-system-artifact</id>
								<phase>package</phase>
								<goals>
									<goal>system</goal>
								</goals>
								<configuration>
									<output>${metadata.target.directory}/releaseMetadata/system.xml</output>
								</configuration>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-assembly-plugin</artifactId>
						<inherited>false</inherited>
						<executions>
							<execution>
								<id>assemble-releaseMetatda-artifact</id>
								<phase>package</phase>
								<goals>
									<goal>single</goal>
								</goals>
								<configuration>
									<outputDirectory>${project.build.directory}</outputDirectory>
									<descriptors>
										<descriptor>${metadata.source.directory}/releaseMetadata-assembly.xml</descriptor>
									</descriptors>
								</configuration>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-resources-plugin</artifactId>
						<executions>
							<execution>
								<id>filter-artifacts</id>
								<phase>package</phase>
								<goals>
									<goal>copy-resources</goal>
								</goals>
								<configuration>
									<outputDirectory>${project.build.directory}</outputDirectory>
									<resources>
										<resource>
											<filtering>true</filtering>
											<directory>${metadata.source.directory}</directory>
											<includes>
												<include>releaseMetadataReference.xml</include>
											</includes>
										</resource>
									</resources>
								</configuration>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>build-helper-maven-plugin</artifactId>
						<executions>
							<execution>
								<id>attach-artifacts</id>
								<phase>package</phase>
								<goals>
									<goal>attach-artifact</goal>
								</goals>
								<configuration>
									<artifacts>
										<artifact>
											<file>${project.build.directory}/releaseMetadataReference.xml</file>
											<type>xml</type>
											<classifier>releaseMetadataReference</classifier>
										</artifact>
									</artifacts>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
			
			<distributionManagement>
				<repository>
					<id>nexus-yaas</id>
					<url>https://nexus.wdf.sap.corp:8443/nexus/content/repositories/deploy.releases.yaas</url>
				</repository>
			</distributionManagement>
		</profile>
	</profiles>
</project>
