<?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>cn.patterncat</groupId>
    <artifactId>springboot-webdriver-starter</artifactId>
    <version>0.0.7</version>
    <packaging>jar</packaging>

    <name>springboot-webdriver-starter</name>
    <description>springboot-webdriver-starter</description>
    <url>https://github.com/patterncat/springboot-webdriver</url>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-parent</artifactId>
                <version>1.4.6.RELEASE</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <java.version>1.8</java.version>
        <lombok.version>1.16.4</lombok.version>
        <phantomjs.version>2.1.1</phantomjs.version>
        <selenium.java.version>3.4.0</selenium.java.version>
        <phantomjsdriver.version>1.4.3</phantomjsdriver.version>
        <common.pool.version>2.4.2</common.pool.version>
    </properties>

    <dependencies>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-configuration-processor</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- util -->
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>${lombok.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-pool2</artifactId>
            <version>${common.pool.version}</version>
        </dependency>

        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-chrome-driver</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-firefox-driver</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- embeded server side web browser phantomjs version 2.1.1 -->
        <dependency>
            <groupId>net.anthavio</groupId>
            <artifactId>phanbedder-2.1.1</artifactId>
            <version>1.0.0</version>
            <exclusions>
                <exclusion>
                    <!--自带的ghostdriver版本是合并之前的版本,selenium才2.39.0-->
                    <!--http://mvnrepository.com/artifact/com.github.detro.ghostdriver/phantomjsdriver/1.1.0-->
                    <groupId>com.github.detro.ghostdriver</groupId>
                    <artifactId>phantomjsdriver</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>com.codeborne</groupId>
            <artifactId>phantomjsdriver</artifactId>
            <version>1.4.3</version>
            <!-- 诡异的问题,1.4.3版本依赖了2.53.1版本的selenium -->
            <exclusions>
                <exclusion>
                    <groupId>org.seleniumhq.selenium</groupId>
                    <artifactId>selenium-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.seleniumhq.selenium</groupId>
                    <artifactId>selenium-remote-driver</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <!--embeded web driver for phantomjs,1.4.3集成的selenium为3.4.0-->
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-remote-driver</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-support</artifactId>
            <scope>provided</scope>
        </dependency>

    </dependencies>

    <issueManagement>
        <system>Github Issue</system>
        <url>https://github.com/patterncat/springboot-webdriver/issues</url>
    </issueManagement>

    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>patterncat</name>
            <email>patterncat@gmail.com</email>
        </developer>
    </developers>

    <scm>
        <connection>scm:git@github.com:patterncat/springboot-webdriver.git</connection>
        <developerConnection>scm:git@github.com:patterncat/springboot-webdriver.git</developerConnection>
        <url>git@github.com:patterncat/springboot-webdriver.git</url>
    </scm>

    <build>
        <!--<pluginManagement>-->
            <!--<plugins>-->
                <!--<plugin>-->
                    <!--<groupId>org.springframework.boot</groupId>-->
                    <!--<artifactId>spring-boot-maven-plugin</artifactId>-->
                    <!--<version>1.4.6.RELEASE</version>-->
                    <!--&lt;!&ndash;<executions>&ndash;&gt;-->
                        <!--&lt;!&ndash;<execution>&ndash;&gt;-->
                            <!--&lt;!&ndash;<goals>&ndash;&gt;-->
                                <!--&lt;!&ndash;<goal>repackage</goal>&ndash;&gt;-->
                            <!--&lt;!&ndash;</goals>&ndash;&gt;-->
                        <!--&lt;!&ndash;</execution>&ndash;&gt;-->
                    <!--&lt;!&ndash;</executions>&ndash;&gt;-->
                <!--</plugin>-->
            <!--</plugins>-->
        <!--</pluginManagement>-->
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                </configuration>
            </plugin>
            <!--<plugin>-->
                <!--<groupId>org.springframework.boot</groupId>-->
                <!--<artifactId>spring-boot-maven-plugin</artifactId>-->
                <!--<configuration>-->
                    <!--<skip>true</skip>-->
                <!--</configuration>-->
            <!--</plugin>-->

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.10.4</version>
                <configuration>
                    <aggregate>true</aggregate>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <distributionManagement>
                <snapshotRepository>
                    <id>oss</id>
                    <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
                </snapshotRepository>
                <repository>
                    <id>oss</id>
                    <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
                </repository>
            </distributionManagement>
            <build>
                <plugins>
                    <!-- Source -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>3.0.1</version>
                        <executions>
                            <execution>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <!-- Javadoc -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.10.4</version>
                        <executions>
                            <execution>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <!-- Gpg Signature -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>


</project>
