<?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>1.3.1.RELEASE</version>
    <packaging>pom</packaging>
    <name>app-starters-build</name>
    <parent>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-build</artifactId>
        <version>1.3.7.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.6.RELEASE</scs-app-maven-plugin.version>
        <app-starters-docs-plugin.version>1.1.4.RELEASE</app-starters-docs-plugin.version>
        <app-metadata-maven-plugin-version>1.0.0.RELEASE</app-metadata-maven-plugin-version>
        <bomsWithHigherPrecedence/>
        <bootVersion>1.5.9.RELEASE</bootVersion>
        <app-starters-core-dependencies.version>1.3.1.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>1.3.1.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.cloud</groupId>
            <artifactId>spring-cloud-stream-metrics</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</artifactId>
            <optional>true</optional>
            <scope>test</scope>
        </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-logging</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-security</artifactId>
        </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.7</javaVersion>
                                <bootVersion>${bootVersion}</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-10/>
                                    <rabbit>
                                        <forceDependencies>
                                            <dependency>
                                                <groupId>org.springframework.amqp</groupId>
                                                <artifactId>spring-rabbit</artifactId>
                                                <version>1.7.5.RELEASE</version>
                                            </dependency>
                                            <dependency>
                                                <groupId>org.springframework.amqp</groupId>
                                                <artifactId>spring-amqp</artifactId>
                                                <version>1.7.5.RELEASE</version>
                                            </dependency>
                                        </forceDependencies>
                                    </rabbit>
                                </binders>
                                <additionalGlobalDependencies>
                                    <dependency>
                                        <groupId>org.springframework.cloud</groupId>
                                        <artifactId>spring-cloud-starter-config</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>
                            </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>
                    <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>
