<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.paulhammant</groupId>
    <artifactId>ngwebdriver</artifactId>
    <version>1.2</version>
    <packaging>jar</packaging>

    <name>ngWebDriver</name>
    <description>Helper classes for WebDriver and AngularJS</description>
    <inceptionYear>2013</inceptionYear>
    <url>https://github.com/paul-hammant/ngWebDriver</url>

    <properties>
        <maven.compiler.source>11</maven.compiler.source>
        <maven.compiler.target>11</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <!-- NOTE: Set -Dfile.encoding=UTF-8 in MAVEN_OPTS -->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <resource.encoding>UTF-8</resource.encoding>
        <sonatype.nexus.url>https://oss.sonatype.org</sonatype.nexus.url>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <version>7.6.1</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>junit</groupId>
                    <artifactId>junit</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-all</artifactId>
            <version>1.3</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.seleniumhq.selenium.fluent</groupId>
            <artifactId>fluent-selenium</artifactId>
            <version>1.23</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>  <!-- declare the exclusion here -->
                    <groupId>org.seleniumhq.selenium</groupId>
                    <artifactId>selenium-java</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-java</artifactId>
            <version>4.3.0</version>
            <exclusions>
                <exclusion>
                    <groupId>org.eclipse.jetty.websocket</groupId>
                    <artifactId>websocket-client</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-server</artifactId>
            <version>11.0.11</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
            </resource>
        </resources>
        <plugins>
        <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
            <version>1.6.6</version>
            <extensions>true</extensions>
            <configuration>
                <serverId>nexus-oss-sonatype</serverId>
                <nexusUrl>https://oss.sonatype.org/</nexusUrl>
            </configuration>
        </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>sonatype-oss-release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>3.0.1</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <passphrase>${gpg.passphrase}</passphrase>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
            <properties>
                <gpg.passphrase>${env.GPG_PASSPHRASE}</gpg.passphrase>
            </properties>
        </profile>
    </profiles>

    <licenses>
        <license>
            <name>The MIT license</name>
            <url>https://github.com/paul-hammant/ngWebDriver/blob/master/LICENSE</url>
        </license>
    </licenses>

    <scm>
        <connection>scm:git:git@github.com:paul-hammant/ngWebDriver.git</connection>
        <developerConnection>scm:git:git@github.com:paul-hammant/ngWebDriver.git</developerConnection>
        <url>git@github.com:paul-hammant/ngWebDriver.git</url>
        <tag>ngwebdriver-1.2</tag>
    </scm>

    <developers>
        <developer>
            <id>paul-hammant</id>
            <name>Paul Hammant</name>
            <roles>
                <role>Lead</role>
            </roles>
        </developer>
    </developers>

    <distributionManagement>
        <snapshotRepository>
            <id>sonatype-nexus-oss</id>
            <name>Sonatype Nexus Snapshots</name>
            <url>${sonatype.nexus.url}/content/repositories/snapshots/</url>
        </snapshotRepository>
        <repository>
            <id>sonatype-nexus-oss</id>
            <name>Sonatype Nexus Staging</name>
            <url>${sonatype.nexus.url}/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

</project>
