<?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>org.springframework.cloud.stream.app</groupId>
	<artifactId>app-starters-build</artifactId>
	<version>2.1.0.RELEASE</version>
	<packaging>pom</packaging>
	<name>app-starters-build</name>
	<parent>
		<groupId>org.springframework.cloud</groupId>
		<artifactId>spring-cloud-build</artifactId>
		<version>2.1.3.RELEASE</version>
		<relativePath />
	</parent>
	<scm>
		<connection>scm:git:git://github.com/spring-cloud-stream-app-starters/core.git</connection>
		<developerConnection>scm:git:ssh://git@github.com/spring-cloud-stream-app-starters/core.git
		</developerConnection>
		<url>https://github.com/spring-cloud-stream-app-starters/core</url>
	</scm>

	<properties>
		<scs-app-maven-plugin.version>1.2.12.RELEASE</scs-app-maven-plugin.version>
		<app-starters-docs-plugin.version>2.0.1.RELEASE	</app-starters-docs-plugin.version>
		<app-metadata-maven-plugin-version>1.0.1.RELEASE</app-metadata-maven-plugin-version>
		<bomsWithHigherPrecedence/>
		<app-starters-core-dependencies.version>2.1.0.RELEASE</app-starters-core-dependencies.version>
	</properties>

	<modules>
		<module>core-dependencies</module>
		<module>common</module>
	</modules>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>org.springframework.cloud.stream.app</groupId>
				<artifactId>app-starters-core-dependencies</artifactId>
				<version>2.1.0.RELEASE</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<dependencies>
		<dependency>
			<groupId>org.springframework.cloud</groupId>
			<artifactId>spring-cloud-stream</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-configuration-processor</artifactId>
			<optional>true</optional>
		</dependency>
		<dependency>
			<groupId>com.jayway.jsonpath</groupId>
			<artifactId>json-path</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.integration</groupId>
			<artifactId>spring-integration-xml</artifactId>
			<exclusions>
				<exclusion>
					<groupId>commons-logging</groupId>
					<artifactId>commons-logging</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>org.springframework.cloud</groupId>
			<artifactId>spring-cloud-stream-test-support-internal</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.springframework.integration</groupId>
			<artifactId>spring-integration-test</artifactId>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-actuator</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-web</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-logging</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-security</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.cloud</groupId>
			<artifactId>spring-cloud-stream-test-support</artifactId>
			<scope>test</scope>
		</dependency>
		<!--<dependency>-->
			<!--<groupId>io.pivotal.spring.cloud</groupId>-->
			<!--<artifactId>spring-cloud-services-starter-config-client</artifactId>-->
		<!--</dependency>-->
	</dependencies>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.springframework.cloud</groupId>
                    <artifactId>spring-cloud-app-starter-doc-maven-plugin</artifactId>
                    <version>${app-starters-docs-plugin.version}</version>
                    <executions>
                        <execution>
                            <id>generate-documentation</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>generate-documentation</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
				<plugin>
					<artifactId>maven-javadoc-plugin</artifactId>
					<configuration>
						<quiet>true</quiet>
					</configuration>
				</plugin>
				<plugin>
					<artifactId>maven-surefire-plugin</artifactId>
					<configuration>
						<redirectTestOutputToFile>true</redirectTestOutputToFile>
					</configuration>
				</plugin>
            </plugins>
        </pluginManagement>
    </build>

    <profiles>
        <profile>
            <id>generateApps</id>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.springframework.cloud.stream.app.plugin</groupId>
                            <artifactId>spring-cloud-stream-app-maven-plugin</artifactId>
                            <version>${scs-app-maven-plugin.version}</version>
                            <executions>
                                <execution>
                                    <id>app-gen</id>
                                    <phase>install</phase>
                                    <goals>
                                        <goal>generate-app</goal>
                                    </goals>
                                </execution>
                            </executions>
                            <configuration>
                                <javaVersion>1.8</javaVersion>
                                <bootVersion>${spring-boot.version}</bootVersion>
                                <applicationType>stream</applicationType>
                                <additionalBoms>
                                    <bom>
                                        <name>app-starters-core-dependencies</name>
                                        <groupId>org.springframework.cloud.stream.app</groupId>
                                        <artifactId>app-starters-core-dependencies</artifactId>
                                        <version>${app-starters-core-dependencies.version}</version>
                                    </bom>
                                </additionalBoms>
                                <binders>
                                    <kafka/>
                                    <rabbit/>
                                </binders>
								<additionalGlobalDependencies>
									<dependency>
										<groupId>org.springframework.cloud.stream.app</groupId>
										<artifactId>app-starters-security-common</artifactId>
									</dependency>
									<dependency>
										<groupId>org.springframework.cloud</groupId>
										<artifactId>spring-cloud-starter-config</artifactId>
									</dependency>
									<dependency>
										<groupId>org.springframework.cloud.stream.app</groupId>
										<artifactId>app-starters-micrometer-common</artifactId>
									</dependency>
									<dependency>
										<groupId>io.micrometer</groupId>
										<artifactId>micrometer-registry-influx</artifactId>
									</dependency>
									<dependency>
										<groupId>io.micrometer</groupId>
										<artifactId>micrometer-registry-prometheus</artifactId>
									</dependency>
									<dependency>
										<groupId>io.micrometer</groupId>
										<artifactId>micrometer-registry-datadog</artifactId>
									</dependency>
									<dependency>
										<groupId>org.springframework.cloud</groupId>
										<artifactId>spring-cloud-cloudfoundry-connector</artifactId>
									</dependency>
									<dependency>
										<groupId>org.springframework.cloud</groupId>
										<artifactId>spring-cloud-spring-service-connector</artifactId>
									</dependency>
								</additionalGlobalDependencies>
								<additionalPlugins>
									<plugin>
										<groupId>org.springframework.cloud</groupId>
										<artifactId>spring-cloud-app-starter-metadata-maven-plugin</artifactId>
										<version>${app-metadata-maven-plugin-version}</version>
										<executions>
											<execution>
												<id>aggregate-metadata</id>
												<phase>compile</phase>
												<goals>
													<goal>aggregate-metadata</goal>
												</goals>
											</execution>
										</executions>
									</plugin>
								</additionalPlugins>
								<globalAppProperties>
									<globalAppProperty>spring.cloud.stream.propagateOriginalContentType=false</globalAppProperty>
								</globalAppProperties>
                            </configuration>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>

		<profile>
			<id>spring</id>
			<repositories>
				<repository>
					<snapshots>
						<enabled>true</enabled>
					</snapshots>
					<id>spring-snapshots</id>
					<name>Spring Snapshots</name>
					<url>http://repo.spring.io/libs-snapshot-local</url>
				</repository>
				<repository>
					<snapshots>
						<enabled>false</enabled>
					</snapshots>
					<id>spring-milestones</id>
					<name>Spring Milestones</name>
					<url>http://repo.spring.io/libs-milestone-local</url>
				</repository>
				<repository>
					<snapshots>
						<enabled>false</enabled>
					</snapshots>
					<id>spring-releases</id>
					<name>Spring Releases</name>
					<url>http://repo.spring.io/release</url>
				</repository>
				<repository>
					<snapshots>
						<enabled>false</enabled>
					</snapshots>
					<id>spring-libs-release</id>
					<name>Spring Libs Release</name>
					<url>http://repo.spring.io/libs-release</url>
				</repository>
				<repository>
					<snapshots>
						<enabled>false</enabled>
					</snapshots>
					<id>spring-milestone-release</id>
					<name>Spring Milestone Release</name>
					<url>http://repo.spring.io/libs-milestone</url>
				</repository>
			</repositories>
			<pluginRepositories>
				<pluginRepository>
                                        <id>spring-releases</id>
                                        <name>Spring Releases</name>
                                        <url>http://repo.spring.io/libs-release</url>
                                </pluginRepository>
				<pluginRepository>
					<snapshots>
						<enabled>true</enabled>
					</snapshots>
					<id>spring-snapshots</id>
					<name>Spring Snapshots</name>
					<url>http://repo.spring.io/libs-snapshot-local</url>
				</pluginRepository>
				<pluginRepository>
					<snapshots>
						<enabled>false</enabled>
					</snapshots>
					<id>spring-milestones</id>
					<name>Spring Milestones</name>
					<url>http://repo.spring.io/libs-milestone-local</url>
				</pluginRepository>
			</pluginRepositories>
		</profile>
	</profiles>

</project>
