<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>io.github.sukgu</groupId>
  <artifactId>automation</artifactId>
  <version>0.1.3</version>

  <name>automation</name>
  <description>This project automates shadow-dom elements using java selenium</description>
  <url>http://maven.apache.org</url>
  
  <licenses>
	<license>
	  <name>The Apache License, Version 2.0</name>
	  <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
	</license>
  </licenses>
  
   <developers>
	  <developer>
	    <name>Sushil Gupta</name>
	    <email>sushil106768@gmail.com</email>
	    <organization>Individual</organization>
	    <organizationUrl>https://www.github.com/sukgu</organizationUrl>
	  </developer>
   </developers>
   
   <scm>
	  <connection>scm:git:git://github.com/sukgu/shadow-automation-selenium.git</connection>
	  <developerConnection>scm:git:git@github.com:sukgu/shadow-automation-selenium.git</developerConnection>
	  <url>https://github.com/sukgu/shadow-automation-selenium</url>
	</scm>
   
  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <hamcrest-all.version>1.3</hamcrest-all.version>
    <java.version>1.8</java.version>
    <junit-jupiter.version>5.4.0</junit-jupiter.version>
    <junit-jupiter-engine-version>5.4.0</junit-jupiter-engine-version>
    <junit-vintage-engine-version>5.4.0</junit-vintage-engine-version>
    <junit-platform-launcher.version>1.4.0</junit-platform-launcher.version>
    <maven.compiler.target>1.8</maven.compiler.target>
    <maven-surefire-plugin.version>2.20</maven-surefire-plugin.version>
    <maven-compiler-plugin.version>3.6.0</maven-compiler-plugin.version>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven-surefire-plugin.version>2.22.0</maven-surefire-plugin.version>
    <maven.compiler.target>${java.version}</maven.compiler.target>
    <maven.compiler.source>${java.version}</maven.compiler.source>
    <selenium.version>3.14.0</selenium.version>
    <webdrivermanager.version>3.8.1</webdrivermanager.version>
    <selenium-chrome-driver.version>${selenium.version}</selenium-chrome-driver.version>
    <selenium-firefox-driver.version>${selenium.version}</selenium-firefox-driver.version>
  </properties>

  <dependencies>
  
  	<!-- https://mvnrepository.com/artifact/org.hamcrest/hamcrest-all -->
	<dependency>
	    <groupId>org.hamcrest</groupId>
	    <artifactId>hamcrest-all</artifactId>
	    <version>${hamcrest-all.version}</version>
	    <scope>test</scope>
	</dependency>
	  	
  	<dependency>
      <groupId>org.seleniumhq.selenium</groupId>
      <artifactId>selenium-firefox-driver</artifactId>
      <version>${selenium-firefox-driver.version}</version>
    </dependency>
    
    <dependency>
      <groupId>org.seleniumhq.selenium</groupId>
      <artifactId>selenium-chrome-driver</artifactId>
      <version>${selenium-chrome-driver.version}</version>
    </dependency>
    
    <dependency>
      <groupId>io.github.bonigarcia</groupId>
      <artifactId>webdrivermanager</artifactId>
      <version>${webdrivermanager.version}</version>
      <exclusions>
        <exclusion>
          <groupId>junit</groupId>
          <artifactId>junit</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    
    <!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api -->
	<dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter-api</artifactId>
        <version>${junit-jupiter.version}</version>
        <scope>test</scope>
    </dependency>
    
    <dependency>
	    <groupId>org.junit.platform</groupId>
	    <artifactId>junit-platform-launcher</artifactId>
	    <version>${junit-platform-launcher.version}</version>
	    <scope>test</scope>
	</dependency>
	<dependency>
	    <groupId>org.junit.jupiter</groupId>
	    <artifactId>junit-jupiter-engine</artifactId>
	    <version>${junit-jupiter-engine-version}</version>
	    <scope>test</scope>
	</dependency>
	<dependency>
	    <groupId>org.junit.vintage</groupId>
	    <artifactId>junit-vintage-engine</artifactId>
	    <version>${junit-vintage-engine-version}</version>
	    <scope>test</scope>
	</dependency>

    
    <!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-api -->
	<dependency>
	    <groupId>org.seleniumhq.selenium</groupId>
	    <artifactId>selenium-api</artifactId>
	    <version>${selenium.version}</version>
	    <scope>compile</scope>
	    <optional>true</optional>
	</dependency>
	
	<!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-server -->
	<dependency>
	    <groupId>org.seleniumhq.selenium</groupId>
	    <artifactId>selenium-server</artifactId>
	    <version>${selenium.version}</version>
	    <scope>compile</scope>
	    <optional>true</optional>
	</dependency>
	
	<!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java -->
	<dependency>
	    <groupId>org.seleniumhq.selenium</groupId>
	    <artifactId>selenium-java</artifactId>
	    <version>${selenium.version}</version>
	    <scope>compile</scope>
	    <optional>true</optional>
	</dependency>
    
  </dependencies>
  
  <distributionManagement>
	  <snapshotRepository>
	   <id>ossrh</id>
	   <url>https://oss.sonatype.org/content/repositories/snapshots</url>
	  </snapshotRepository>
	  <repository>
	   <id>ossrh</id>
	   <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
	  </repository>
  </distributionManagement>
  
  <build>
	  <plugins>
	  
	  	<plugin>
	        <groupId>org.apache.maven.plugins</groupId>
	        <artifactId>maven-surefire-plugin</artifactId>
	        <version>${maven-surefire-plugin.version}</version>
	        <executions>
	          <execution>
	            <configuration>
	              <systemPropertyVariables>
	                <webdriver.driver>${browser.name}</webdriver.driver>
	              </systemPropertyVariables>
	            </configuration>
	          </execution>
	        </executions>
	    </plugin>
	    
	    <plugin>
		    <groupId>org.apache.maven.plugins</groupId>
		    <artifactId>maven-compiler-plugin</artifactId>
		    <version>${maven-compiler-plugin.version}</version>
		    <goals>
		      <goal>compile</goal>
		    </goals>
		    <configuration>
		      <source>${java.version}</source>
		      <target>${java.version}</target>
		      <encoding>${project.build.sourceEncoding}</encoding>
		      <compilerArgument>-Xlint:all</compilerArgument>
		      <compilerArgument>-Xlint:-processing</compilerArgument>
		      <showWarnings>true</showWarnings>
		      <showDeprecation>true</showDeprecation>
		    </configuration>
		</plugin>
	    
	   	<plugin>
		    <groupId>org.apache.maven.plugins</groupId>
		    <artifactId>maven-source-plugin</artifactId>
		    <version>2.2.1</version>
		    <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>
		    <version>2.9.1</version>
		    <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>1.5</version>
		    <executions>
			     <execution>
				      <id>sign-artifacts</id>
				      <phase>verify</phase>
					      <goals>
					       		<goal>sign</goal>
					      </goals>
			     </execution>
		    </executions>
	   </plugin>
	   <plugin>
	        <groupId>org.sonatype.plugins</groupId>
	        <artifactId>nexus-staging-maven-plugin</artifactId>
	        <version>1.6.7</version>
	        <extensions>true</extensions>
	        <configuration>
		          <serverId>ossrh</serverId>
		          <nexusUrl>https://oss.sonatype.org/</nexusUrl>
		          <!-- Set this to true and the release will automatically proceed and sync to Central Repository will follow  -->
		          <autoReleaseAfterClose>false</autoReleaseAfterClose>
	        </configuration>
      </plugin>
	  <plugin>
			<groupId>org.codehaus.mojo</groupId>
			<artifactId>cobertura-maven-plugin</artifactId>
			<version>2.7</version>
			<configuration>
				<formats>
					<format>html</format>
					<format>xml</format>
				</formats>
				<check />
			</configuration>
	  </plugin>
	  <plugin>
		  <groupId>org.apache.maven.plugins</groupId>
		  <artifactId>maven-release-plugin</artifactId>
		  <version>2.5.3</version>
		  <configuration>
		    <autoVersionSubmodules>true</autoVersionSubmodules>
		    <useReleaseProfile>true</useReleaseProfile>
		    <releaseProfiles>release</releaseProfiles>
		    <goals>deploy</goals>
		  </configuration>
		</plugin>
	  
	  </plugins>
	  
	  <resources>
        <resource>
            <directory>${basedir}/resources</directory>
            <includes>
                <include>querySelector.js</include>
            </includes>
        </resource>
      </resources>
	  
  </build>
  
  <profiles>
    <profile>
      <id>chrome</id>
      <properties>
        <browser.name>chrome</browser.name>
      </properties>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
    </profile>
    <profile>
      <id>edge</id>
      <properties>
        <browser.name>edge</browser.name>
      </properties>
    </profile>
    <profile>
      <id>firefox</id>
      <properties>
        <browser.name>firefox</browser.name>
      </properties>
    </profile>
  </profiles>
  
</project>
