
<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>

    <parent>
        <groupId>org.jboss.arquillian.graphene</groupId>
        <artifactId>graphene-parent</artifactId>
        <version>2.1.0.Final</version>
    </parent>

    <artifactId>graphene-webdriver-impl</artifactId>
    <name>Graphene: Implementation</name>

    <dependencies>
        <!-- Provided dependencies -->
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-java</artifactId>
            <scope>provided</scope>
            <!-- excluding cglib, since we want to avoid conflict with bundled one
                 and this dependency is only for compilation -->
            <exclusions>
                <exclusion>
                    <groupId>cglib</groupId>
                    <artifactId>cglib-nodep</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-support</artifactId>
            <scope>provided</scope>
             <exclusions>
                <exclusion>
                    <groupId>cglib</groupId>
                    <artifactId>cglib-nodep</artifactId>           
                </exclusion>
            </exclusions>         
        </dependency>
        <!-- Arquillian Drone -->
        <dependency>
            <groupId>org.jboss.arquillian.extension</groupId>
            <artifactId>arquillian-drone-impl</artifactId>
        </dependency>

        <!-- Runtime Dependencies -->
        <dependency>
            <groupId>org.jboss.arquillian.graphene</groupId>
            <artifactId>graphene-webdriver-spi</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jboss.arquillian.graphene</groupId>
            <artifactId>graphene-webdriver-api</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>org.jboss.arquillian.extension</groupId>
            <artifactId>arquillian-drone-configuration</artifactId>
        </dependency>

        <!-- cglib and objenesis are implementation details required for proxying -->
        <!-- both artifacts are shaded via shade plugin -->
        <dependency>
            <groupId>cglib</groupId>
            <artifactId>cglib</artifactId>
        </dependency>
        <dependency>
            <groupId>org.objenesis</groupId>
            <artifactId>objenesis</artifactId>
        </dependency>
        <!-- end of shaded artifacts -->

        <dependency>
            <groupId>org.jboss.arquillian.core</groupId>
            <artifactId>arquillian-core-spi</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.arquillian.test</groupId>
            <artifactId>arquillian-test-spi</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.arquillian.config</groupId>
            <artifactId>arquillian-config-api</artifactId>
        </dependency>
        
        <dependency>
            <groupId>org.jboss.arquillian.container</groupId>
            <artifactId>arquillian-container-spi</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.arquillian.container</groupId>
            <artifactId>arquillian-container-test-spi</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.arquillian.container</groupId>
            <artifactId>arquillian-container-test-impl-base</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.jboss.arquillian.core</groupId>
            <artifactId>arquillian-core-impl-base</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.arquillian.core</groupId>
            <artifactId>arquillian-core-impl-base</artifactId>
            <classifier>tests</classifier>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.arquillian.test</groupId>
            <artifactId>arquillian-test-impl-base</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.arquillian.test</groupId>
            <artifactId>arquillian-test-impl-base</artifactId>
            <classifier>tests</classifier>
            <scope>test</scope>
        </dependency>

        <!-- Test dependencies -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <resources>
            <resource>
                <directory>${basedir}/src/main/javascript</directory>
                <filtering>false</filtering>
            </resource>
            <resource>
                <directory>${basedir}/src/main/resources</directory>
                <filtering>false</filtering>
            </resource>
        </resources>
        <testResources>
            <testResource>
                <directory>${basedir}/src/test/javascript</directory>
                <filtering>false</filtering>
            </testResource>
        </testResources>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <configuration>
                    <excludes>org/jboss/arquillian/graphene/context/ClassImposterizer.java</excludes>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.mycila.maven-license-plugin</groupId>
                <artifactId>maven-license-plugin</artifactId>
                <configuration>
                    <excludes>
                        <exclude>**/ClassImposterizer.java</exclude>
                        <exclude>**/jquery*.js</exclude>
                        <exclude>**/qunit.js</exclude>
                        <exclude>**/qunit.css</exclude>
                    </excludes>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>animal-sniffer-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-report-plugin</artifactId>
            </plugin>
            <!-- we need to shade cglib so it does not interfere with other cglib implementation on classpath -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <executions>
                    <execution>
                        <id>shade-proxying-implementation</id>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <artifactSet>
                                <includes>
                                    <include>asm</include>
                                    <include>cglib</include>
                                    <include>org.objenesis</include>
                                </includes>
                            </artifactSet>
                            <relocations>
                                <relocation>
                                    <pattern>org.objectweb.asm</pattern>
                                    <shadedPattern>org.jboss.arquillian.graphene.shaded.org.objectweb.asm</shadedPattern>
                                </relocation>
                                <relocation>
                                    <pattern>net.sf.cglib</pattern>
                                    <shadedPattern>org.jboss.arquillian.graphene.shaded.net.sf.cglib</shadedPattern>
                                </relocation>
                                <relocation>
                                    <pattern>org.objenesis</pattern>
                                    <shadedPattern>org.jboss.arquillian.graphene.shaded.org.objenesis</shadedPattern>
                                </relocation>
                            </relocations>
                            <createSourcesJar>true</createSourcesJar>
                            <createDependencyReducedPom>false</createDependencyReducedPom>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>