<?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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>com.vaadin</groupId>
        <artifactId>vaadin-testbench-parent</artifactId>
        <version>5.1.1</version>
    </parent>

    <artifactId>vaadin-testbench-core</artifactId>
    <packaging>jar</packaging>
    <name>Vaadin TestBench Core</name>
    <inceptionYear>2012</inceptionYear>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <selenium.version>3.4.0</selenium.version>
        <snapshot.repository.url>https://oss.sonatype.org/content/repositories/vaadin-snapshots/
        </snapshot.repository.url>
    </properties>

    <licenses>
        <license>
            <name>Commercial Vaadin Add-On License version 3.0</name>
            <url>http://vaadin.com/license/cval-3</url>
            <distribution>manual</distribution>
        </license>
    </licenses>

    <profiles>
        <profile>
            <id>release</id>
            <distributionManagement>
                <snapshotRepository>
                    <id>vaadin-snapshots</id>
                    <name>Vaadin snapshot repository</name>
                    <url>${snapshot.repository.url}</url>
                </snapshotRepository>
                <repository>
                    <id>vaadin-addons</id>
                    <name>Vaadin add-ons repository</name>
                    <url>https://tools.vaadin.com/nexus/content/repositories/vaadin-addons</url>
                </repository>
            </distributionManagement>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.9</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-jar-plugin</artifactId>
                        <version>2.3.1</version>
                        <configuration>
                            <archive>
                                <index>true</index>
                                <manifest>
                                    <addClasspath>true</addClasspath>
                                    <!-- Implementation-Title and Implementation-Version come from the
                                        POM by default -->
                                    <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                                </manifest>
                                <manifestEntries>
                                    <!-- Package format version - do not change -->
                                    <Vaadin-Package-Version>1</Vaadin-Package-Version>
                                </manifestEntries>
                            </archive>
                            <excludes>
                                <!-- Remove resources included due to gwt compilation -->
                                <exclude>**/demoandtestapp/*</exclude>
                            </excludes>
                        </configuration>
                    </plugin>

                    <plugin>
                        <artifactId>maven-deploy-plugin</artifactId>
                        <version>2.5</version>
                        <configuration>
                            <skip>false</skip>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.5</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.0.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>2.12</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>integration-test</goal>
                            <goal>verify</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>2.6</version>
                <configuration>
                    <basedir>${basedir}</basedir>
                    <header>${basedir}/src/license/cval3/header.txt</header>
                    <quiet>false</quiet>
                    <failIfMissing>true</failIfMissing>
                    <aggregate>false</aggregate>
                    <useDefaultExcludes>true</useDefaultExcludes>
                    <useDefaultMapping>true</useDefaultMapping>
                    <encoding>UTF-8</encoding>
                    <properties>
                        <year>${project.inceptionYear}</year>
                    </properties>
                    <excludes>
                        <exclude>target/**</exclude>
                        <exclude>**/*.xml</exclude>
                        <exclude>src/license/**/*</exclude>
                        <exclude>**/*.txt</exclude>
                    </excludes>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>format</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <!-- specify version numbers for selenium-server and
             selenium-remote-driver in order to override the
             old version numbers specified by phantomjsdriver
        -->
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-server</artifactId>
            <version>${selenium.version}</version>
        </dependency>
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-remote-driver</artifactId>
            <version>${selenium.version}</version>
        </dependency>
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-java</artifactId>
            <version>${selenium.version}</version>
        </dependency>
        <dependency>
            <groupId>com.codeborne</groupId>
            <artifactId>phantomjsdriver</artifactId>
            <version>1.4.2</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
        </dependency>
        <dependency>
            <groupId>org.easymock</groupId>
            <artifactId>easymock</artifactId>
            <version>3.1</version>
        </dependency>
        <dependency>
            <groupId>org.javassist</groupId>
            <artifactId>javassist</artifactId>
            <version>3.18.1-GA</version>
        </dependency>
        <dependency>
            <groupId>com.google.gwt</groupId>
            <artifactId>gwt-elemental</artifactId>
            <version>2.8.0</version>
            <exclusions>
                <exclusion>
                    <groupId>com.google.gwt</groupId>
                    <artifactId>gwt-user</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
    </dependencies>
</project>
