<?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.didispace</groupId>
    <artifactId>scca-rest</artifactId>
    <name>scca-rest</name>
    <packaging>jar</packaging>

    <parent>
        <groupId>com.didispace</groupId>
        <artifactId>spring-cloud-config-admin</artifactId>
        <version>1.1.1-RELEASE</version>
    </parent>

    <dependencies>
        <dependency>
            <groupId>com.didispace</groupId>
            <artifactId>scca-core</artifactId>
            <version>${version}</version>
        </dependency>

        <!-- spring boot-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-aop</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-security</artifactId>
        </dependency>
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>fastjson</artifactId>
        </dependency>

        <!-- others -->
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>io.swagger</groupId>
            <artifactId>swagger-core</artifactId>
            <version>1.5.12</version>
            <scope>provided</scope>
        </dependency>

        <!--Test Dependency-->

        <!-- scca discovery dependency-->
        <dependency>
            <groupId>com.didispace</groupId>
            <artifactId>scca-discovery-eureka</artifactId>
            <version>${version}</version>
            <scope>test</scope>
        </dependency>
        <!--<dependency>-->
            <!--<groupId>com.didispace</groupId>-->
            <!--<artifactId>scca-discovery-consul</artifactId>-->
            <!--<version>${version}</version>-->
            <!--<scope>test</scope>-->
        <!--</dependency>-->

        <!-- scca persistence dependency -->
        <dependency>
            <groupId>com.didispace</groupId>
            <artifactId>scca-persistence-db</artifactId>
            <version>${version}</version>
            <scope>test</scope>
        </dependency>
        <!--<dependency>-->
            <!--<groupId>com.didispace</groupId>-->
            <!--<artifactId>scca-persistence-git</artifactId>-->
            <!--<version>${version}</version>-->
            <!--<scope>test</scope>-->
        <!--</dependency>-->

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-configuration-processor</artifactId>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.pszymczyk.consul</groupId>
            <artifactId>embedded-consul</artifactId>
            <version>1.0.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-config-server</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>5.1.21</version>
            <scope>test</scope>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.10.4</version>
                <configuration>
                    <charset>UTF-8</charset>
                    <additionalparam>-Xdoclint:none</additionalparam>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.0.0</version>
                <configuration>
                    <attach>true</attach>
                </configuration>
                <executions>
                    <execution>
                        <phase>compile</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.github.kongchen</groupId>
                <artifactId>swagger-maven-plugin</artifactId>
                <version>3.1.7</version>
                <configuration>
                    <apiSources>
                        <apiSource>
                            <springmvc>true</springmvc>
                            <locations>
                                <location>com.didispace.scca.rest</location>
                            </locations>
                            <schemes>
                                <scheme>http</scheme>
                                <scheme>https</scheme>
                            </schemes>
                            <info>
                                <title>Swagger Maven Plugin Sample</title>
                                <version>v1</version>
                                <description>This is a sample.</description>
                                <termsOfService>http://www.github.com/kongchen/swagger-maven-plugin</termsOfService>
                                <license>
                                    <url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
                                    <name>Apache 2.0</name>
                                </license>
                            </info>
                            <swaggerDirectory>${basedir}/src/main/generated/swagger-ui</swaggerDirectory>
                        </apiSource>
                    </apiSources>
                </configuration>
                <executions>
                    <execution>
                        <phase>compile</phase>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>
