<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.infotel.seleniumRobot</groupId>
	<artifactId>seleniumRobot-drivers</artifactId>
	<packaging>pom</packaging>
	<version>5.1.27</version>
	
	<name>seleniumRobot drivers</name>
	<description>Drivers which must be deployed with seleniumRobot core or with seleniumRobot grid</description>
	<url>https://github.com/bhecquet/seleniumRobot-drivers</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>Bertrand Hecquet</name>
			<email>bertrand.hecquet@org.com</email>
			<organization>org</organization>
			<organizationUrl>http://www.org.com</organizationUrl>
		</developer>
	</developers>
	
	<scm>
	    <connection>scm:git:https://github.com/bhecquet/seleniumRobot-drivers.git</connection>
        <developerConnection>scm:git:https://github.com/bhecquet/seleniumRobot-drivers.git</developerConnection>
		<!-- <connection>scm:git:git@github.com:bhecquet/seleniumRobot-drivers.git</connection>
		<developerConnection>scm:git:git@github.com:bhecquet/seleniumRobot-drivers.git</developerConnection> -->
		<url>git@github.com:bhecquet/seleniumRobot-drivers.git</url>
		<tag>seleniumRobot-drivers-5.1.27</tag>
	</scm>
	
	<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>
	
	<repositories>
		<repository>
			<id>central</id>
			<name>Maven Repository Switchboard</name>
			<layout>default</layout>
			<url>http://repo1.maven.org/maven2</url>
			<snapshots>
				<enabled>false</enabled>
			</snapshots>
		</repository>
	</repositories>

	<properties>
		<os>linux</os>
		<is.not.windows>true</is.not.windows>
		<root.path>${project.basedir}</root.path>
		<driver.path>${root.path}/src/main/resources/drivers/</driver.path>
		<chromedriver.url>https://chromedriver.storage.googleapis.com</chromedriver.url>
		<geckodriver.url>https://github.com/mozilla/geckodriver/releases/download</geckodriver.url>
		<iedriver.url>http://selenium-release.storage.googleapis.com</iedriver.url>
		<!-- <edgedriver.url>https://msedgedriver.azureedge.net</edgedriver.url> root URL give all paths -->
		<edgedriver.url>https://msedgewebdriverstorage.blob.core.windows.net/edgewebdriver</edgedriver.url> <!-- root URL give all paths -->
		<chromedriver.suffix />
		<geckodriver.suffix />
		<geckodriver.ext />
		<skip.clean.driver>false</skip.clean.driver>
		<skip.custom.driver>true</skip.custom.driver>
		<selenium.version>3.14.0</selenium.version>
	</properties>

	<modules>
		<module>seleniumRobot-windows-driver</module>
		<module>seleniumRobot-linux-driver</module>
		<module>seleniumRobot-mac-driver</module>
	</modules>

	<dependencies>
		<dependency>
			<groupId>commons-io</groupId>
			<artifactId>commons-io</artifactId>
			<version>2.4</version>
		</dependency>
	</dependencies>

	<build>
		<finalName>${project.artifactId}</finalName>
		<pluginManagement>
			<plugins>
					
				<plugin>
					<groupId>com.googlecode.maven-download-plugin</groupId>
					<artifactId>download-maven-plugin</artifactId>
					<version>1.3.0</version>

					<configuration>
						<unpack>true</unpack>
					</configuration>
					<executions>
						<!-- Chrome version for Android 14 -->
						<execution>
							<id>chromedriver 113</id>
							<phase>generate-resources</phase>
							<goals>
								<goal>wget</goal>
							</goals>
							<configuration>
								<url>${chromedriver.url}/113.0.5672.63/chromedriver_${oldchromedriver.suffix}.zip</url>
								<outputDirectory>${driver.path}${os}/dir_chromedriver_113.0_chrome-113-114</outputDirectory>
							</configuration>
						</execution>
					<execution>
		                                <id>chromedriver 120</id>
		                                <phase>generate-resources</phase>
		                                <goals>
		                                    <goal>wget</goal>
		                                </goals>
		                                <configuration>
		                                    <url>https://storage.googleapis.com/chrome-for-testing-public//120.0.6099.109/${chromedriver.suffix}/chromedriver-${chromedriver.suffix}.zip</url>
		                                    <outputDirectory>${driver.path}${os}/dir_chromedriver_120.0_chrome-120-121</outputDirectory>
		                                </configuration>
		                            </execution>
                        <!-- BEGIN_DRIVER_DEFINITION -->
                            <!-- CHROMEDRIVER: pattern for file MUST BE chromedriver_<version>_chrome-<minChromeVersion>-<maxChromeVersion> -->
            
                            <execution>
                                <id>chromedriver 137</id>
                                <phase>generate-resources</phase>
                                <goals>
                                    <goal>wget</goal>
                                </goals>
                                <configuration>
                                    <url>https://storage.googleapis.com/chrome-for-testing-public//137.0.7127.0/${chromedriver.suffix}/chromedriver-${chromedriver.suffix}.zip</url>
                                    <outputDirectory>${driver.path}${os}/dir_chromedriver_137.0_chrome-137-138</outputDirectory>
                                </configuration>
                            </execution>
                            <execution>
                                <id>chromedriver 136</id>
                                <phase>generate-resources</phase>
                                <goals>
                                    <goal>wget</goal>
                                </goals>
                                <configuration>
                                    <url>https://storage.googleapis.com/chrome-for-testing-public//136.0.7103.25/${chromedriver.suffix}/chromedriver-${chromedriver.suffix}.zip</url>
                                    <outputDirectory>${driver.path}${os}/dir_chromedriver_136.0_chrome-136-137</outputDirectory>
                                </configuration>
                            </execution>
                            <execution>
                                <id>chromedriver 135</id>
                                <phase>generate-resources</phase>
                                <goals>
                                    <goal>wget</goal>
                                </goals>
                                <configuration>
                                    <url>https://storage.googleapis.com/chrome-for-testing-public//135.0.7049.95/${chromedriver.suffix}/chromedriver-${chromedriver.suffix}.zip</url>
                                    <outputDirectory>${driver.path}${os}/dir_chromedriver_135.0_chrome-135-136</outputDirectory>
                                </configuration>
                            </execution>
                            <execution>
                                <id>chromedriver 134</id>
                                <phase>generate-resources</phase>
                                <goals>
                                    <goal>wget</goal>
                                </goals>
                                <configuration>
                                    <url>https://storage.googleapis.com/chrome-for-testing-public//134.0.6998.165/${chromedriver.suffix}/chromedriver-${chromedriver.suffix}.zip</url>
                                    <outputDirectory>${driver.path}${os}/dir_chromedriver_134.0_chrome-134-135</outputDirectory>
                                </configuration>
                            </execution>
                            <execution>
                                <id>chromedriver 133</id>
                                <phase>generate-resources</phase>
                                <goals>
                                    <goal>wget</goal>
                                </goals>
                                <configuration>
                                    <url>https://storage.googleapis.com/chrome-for-testing-public//133.0.6943.141/${chromedriver.suffix}/chromedriver-${chromedriver.suffix}.zip</url>
                                    <outputDirectory>${driver.path}${os}/dir_chromedriver_133.0_chrome-133-134</outputDirectory>
                                </configuration>
                            </execution>
                            <execution>
                                <id>chromedriver 132</id>
                                <phase>generate-resources</phase>
                                <goals>
                                    <goal>wget</goal>
                                </goals>
                                <configuration>
                                    <url>https://storage.googleapis.com/chrome-for-testing-public//132.0.6834.159/${chromedriver.suffix}/chromedriver-${chromedriver.suffix}.zip</url>
                                    <outputDirectory>${driver.path}${os}/dir_chromedriver_132.0_chrome-132-133</outputDirectory>
                                </configuration>
                            </execution>
                            <execution>
                                <id>chromedriver 131</id>
                                <phase>generate-resources</phase>
                                <goals>
                                    <goal>wget</goal>
                                </goals>
                                <configuration>
                                    <url>https://storage.googleapis.com/chrome-for-testing-public//131.0.6778.264/${chromedriver.suffix}/chromedriver-${chromedriver.suffix}.zip</url>
                                    <outputDirectory>${driver.path}${os}/dir_chromedriver_131.0_chrome-131-132</outputDirectory>
                                </configuration>
                            </execution>
                            <execution>
                                <id>chromedriver 130</id>
                                <phase>generate-resources</phase>
                                <goals>
                                    <goal>wget</goal>
                                </goals>
                                <configuration>
                                    <url>https://storage.googleapis.com/chrome-for-testing-public//130.0.6723.116/${chromedriver.suffix}/chromedriver-${chromedriver.suffix}.zip</url>
                                    <outputDirectory>${driver.path}${os}/dir_chromedriver_130.0_chrome-130-131</outputDirectory>
                                </configuration>
                            </execution>
                            <execution>
                                <id>chromedriver 129</id>
                                <phase>generate-resources</phase>
                                <goals>
                                    <goal>wget</goal>
                                </goals>
                                <configuration>
                                    <url>https://storage.googleapis.com/chrome-for-testing-public//129.0.6668.100/${chromedriver.suffix}/chromedriver-${chromedriver.suffix}.zip</url>
                                    <outputDirectory>${driver.path}${os}/dir_chromedriver_129.0_chrome-129-130</outputDirectory>
                                </configuration>
                            </execution>
                            <!-- EDGEDRIVER: pattern for file MUST BE edgedriver_<version>_edge-<minEdgeVersion>-<maxEdgeVersion> -->
            
                            <execution>
                                <id>edgedriver 129</id>
                                <phase>generate-resources</phase>
                                <goals>
                                    <goal>wget</goal>
                                </goals>
                                <configuration>
                                    <skip>${is.not.windows}</skip>
                                    <url>${edgedriver.url}/129.0.2792.89/edgedriver_${edgedriver.suffix}.zip</url>
                                    <outputDirectory>${driver.path}${os}/dir_edgedriver_129.0_edge-129-130</outputDirectory>
                                </configuration>
                            </execution>
                            <execution>
                                <id>edgedriver 130</id>
                                <phase>generate-resources</phase>
                                <goals>
                                    <goal>wget</goal>
                                </goals>
                                <configuration>
                                    <skip>${is.not.windows}</skip>
                                    <url>${edgedriver.url}/130.0.2849.142/edgedriver_${edgedriver.suffix}.zip</url>
                                    <outputDirectory>${driver.path}${os}/dir_edgedriver_130.0_edge-130-131</outputDirectory>
                                </configuration>
                            </execution>
                            <execution>
                                <id>edgedriver 131</id>
                                <phase>generate-resources</phase>
                                <goals>
                                    <goal>wget</goal>
                                </goals>
                                <configuration>
                                    <skip>${is.not.windows}</skip>
                                    <url>${edgedriver.url}/131.0.2903.146/edgedriver_${edgedriver.suffix}.zip</url>
                                    <outputDirectory>${driver.path}${os}/dir_edgedriver_131.0_edge-131-132</outputDirectory>
                                </configuration>
                            </execution>
                            <execution>
                                <id>edgedriver 132</id>
                                <phase>generate-resources</phase>
                                <goals>
                                    <goal>wget</goal>
                                </goals>
                                <configuration>
                                    <skip>${is.not.windows}</skip>
                                    <url>${edgedriver.url}/132.0.2957.178/edgedriver_${edgedriver.suffix}.zip</url>
                                    <outputDirectory>${driver.path}${os}/dir_edgedriver_132.0_edge-132-133</outputDirectory>
                                </configuration>
                            </execution>
                            <execution>
                                <id>edgedriver 133</id>
                                <phase>generate-resources</phase>
                                <goals>
                                    <goal>wget</goal>
                                </goals>
                                <configuration>
                                    <skip>${is.not.windows}</skip>
                                    <url>${edgedriver.url}/133.0.3065.92/edgedriver_${edgedriver.suffix}.zip</url>
                                    <outputDirectory>${driver.path}${os}/dir_edgedriver_133.0_edge-133-134</outputDirectory>
                                </configuration>
                            </execution>
                            <execution>
                                <id>edgedriver 134</id>
                                <phase>generate-resources</phase>
                                <goals>
                                    <goal>wget</goal>
                                </goals>
                                <configuration>
                                    <skip>${is.not.windows}</skip>
                                    <url>${edgedriver.url}/134.0.3124.119/edgedriver_${edgedriver.suffix}.zip</url>
                                    <outputDirectory>${driver.path}${os}/dir_edgedriver_134.0_edge-134-135</outputDirectory>
                                </configuration>
                            </execution>
                            <execution>
                                <id>edgedriver 135</id>
                                <phase>generate-resources</phase>
                                <goals>
                                    <goal>wget</goal>
                                </goals>
                                <configuration>
                                    <skip>${is.not.windows}</skip>
                                    <url>${edgedriver.url}/135.0.3179.73/edgedriver_${edgedriver.suffix}.zip</url>
                                    <outputDirectory>${driver.path}${os}/dir_edgedriver_135.0_edge-135-136</outputDirectory>
                                </configuration>
                            </execution>
                            <execution>
                                <id>edgedriver 136</id>
                                <phase>generate-resources</phase>
                                <goals>
                                    <goal>wget</goal>
                                </goals>
                                <configuration>
                                    <skip>${is.not.windows}</skip>
                                    <url>${edgedriver.url}/136.0.3240.14/edgedriver_${edgedriver.suffix}.zip</url>
                                    <outputDirectory>${driver.path}${os}/dir_edgedriver_136.0_edge-136-137</outputDirectory>
                                </configuration>
                            </execution>
                            <execution>
                                <id>edgedriver 137</id>
                                <phase>generate-resources</phase>
                                <goals>
                                    <goal>wget</goal>
                                </goals>
                                <configuration>
                                    <skip>${is.not.windows}</skip>
                                    <url>${edgedriver.url}/137.0.3264.0/edgedriver_${edgedriver.suffix}.zip</url>
                                    <outputDirectory>${driver.path}${os}/dir_edgedriver_137.0_edge-137-138</outputDirectory>
                                </configuration>
                            </execution>                     
<!-- END_DRIVER_DEFINITION -->                      
                        <!-- GECKODRIVER -->
                        <execution>
                            <id>geckodriver 0.33.0</id>
                            <phase>generate-resources</phase>
                            <goals>
                                <goal>wget</goal>
                            </goals>
                            <configuration>
                                <url>${geckodriver.url}/v0.33.0/geckodriver-v0.33.0-${geckodriver.suffix}${geckodriver.ext}</url>
                                <outputDirectory>${driver.path}${os}/dir_geckodriver</outputDirectory>
                            </configuration>
                        </execution>

                        <!-- IEDriverServer -->
                        <execution>
                            <id>IEDriverServer 64</id>
                            <phase>generate-resources</phase>
                            <goals>
                                <goal>wget</goal>
                            </goals>
                            <configuration>
                                <skip>${is.not.windows}</skip>
                                <url>https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.2.0/IEDriverServer_x64_4.2.0.zip</url>
                                <outputDirectory>${driver.path}${os}/dir_IEDriverServer_x64</outputDirectory>
                            </configuration>
                        </execution>
                        <execution>
                            <id>IEDriverServer 32</id>
                            <phase>generate-resources</phase>
                            <goals>
                                <goal>wget</goal>
                            </goals>
                            <configuration>
                                <skip>${is.not.windows}</skip>
                                <url>https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.2.0/IEDriverServer_Win32_4.2.0.zip</url>
                                <outputDirectory>${driver.path}${os}/dir_IEDriverServer_Win32</outputDirectory>
                            </configuration>
                        </execution>
                        
					</executions>
				</plugin>
				<plugin>
					<artifactId>maven-resources-plugin</artifactId>
					<version>3.1.0</version>
					<executions>
						<execution>
							<id>copy-custom-drivers</id>
							<phase>generate-resources</phase>
							<goals>
								<goal>copy-resources</goal>
							</goals>
							<configuration>
                                <overwrite>true</overwrite>
								<skip>${skip.custom.driver}</skip>
								<outputDirectory>${driver.path}${os}</outputDirectory>
								<resources>
									<resource>
										<directory>${project.basedir}/custom</directory>
									</resource>
								</resources>
							</configuration>            
						</execution>
						<execution>
							<id>default-resources</id>
							<phase>process-resources</phase>
							<goals>
								<goal>resources</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-jar-plugin</artifactId>
					<version>2.6</version>
					<configuration>
						<finalName>${project.artifactId}</finalName>
						<archive>
							<manifest>
								<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
	                			<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
							</manifest>
						</archive>
						<excludes>
							<exclude>**/driversdownload/*</exclude>
						</excludes>
					</configuration>
					<executions>
						<execution>
							<id>default-jar</id>
							<goals>
								<goal>jar</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
				<plugin>
				    <groupId>org.apache.maven.plugins</groupId>
				    <artifactId>maven-javadoc-plugin</artifactId>
				    <version>3.6.0</version>
				    <dependencies>
				        <dependency>
                            <groupId>org.apache.commons</groupId>
                            <artifactId>commons-text</artifactId>
                            <version>1.10.0</version>	        
				        </dependency>
				    </dependencies>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>3.5.1</version>
					<executions>
						<execution>
							<id>default-compile</id>
							<phase>generate-resources</phase>
							<goals>
								<goal>compile</goal>
							</goals>
						</execution>
					</executions>
					<configuration>
						<encoding>utf-8</encoding>
						<source>1.8</source>
						<target>1.8</target>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>exec-maven-plugin</artifactId>
					<version>1.6.0</version>
					<executions>
						<execution>
							<phase>generate-resources</phase>
							<goals>
								<goal>java</goal>
							</goals>
						</execution>
					</executions>
					<configuration>
						<mainClass>fr.covea.seleniumRobot.driversdownload.MoveDrivers</mainClass>
						<arguments>
							<argument>${driver.path}</argument>
							<argument>${os}</argument>
							<argument>${skip.clean.driver}</argument>
						</arguments>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>build-helper-maven-plugin</artifactId>
					<version>3.0.0</version>
					<executions>
						<execution>
							<id>regex-property</id>
							<goals>
								<goal>regex-property</goal>
							</goals>
							<phase>generate-sources</phase>
							<configuration>
	
								<name>selenium.version.short</name>
								<value>${selenium.version}</value>
								<regex>^([0-9]+)\.([0-9]+)\.([0-9]+)(-SNAPSHOT)?$</regex>
								<replacement>$1.$2</replacement>
								<failIfNoMatch>true</failIfNoMatch>
							</configuration>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
				    <artifactId>maven-antrun-plugin</artifactId>
				    <version>1.7</version>
				    <executions>
				        <execution>
				        	<id>generate-driver-list</id>
				            <phase>compile</phase>
				            <configuration>
				                <target>
				                    <fileset id="driver-fileset" dir="src/main/resources/drivers" />
				                    <pathconvert targetos="unix" pathsep="," property="driver-file-list" refid="driver-fileset">
				                        <map from="${project.basedir}/src/main/resources/drivers/" to="" />
				                    </pathconvert>
				                    <echo file="${project.basedir}/target/classes/driver-list-${os}.txt">${driver-file-list}</echo>
				                </target>
				            </configuration>
				            <goals>
				                <goal>run</goal>
				            </goals>
				        </execution>
				        <execution>
				        	<id>generate-os-specific-class</id>
				            <phase>generate-sources</phase>
				            <configuration>
				                <target>
				                	<copy todir="${project.basedir}/src/main/java/fr/covea/seleniumRobot/driversdownload/" overwrite="true">
									  <fileset dir="${project.basedir}/../src/main/java/fr/covea/seleniumRobot/driversdownload/" />
									</copy>
				                    <echo file="${project.basedir}/src/main/java/fr/covea/seleniumRobot/driversdownload/HelloDriver${os}.java">package fr.covea.seleniumRobot.driversdownload;public class HelloDriver${os} {}</echo>
				                </target>
				            </configuration>
				            <goals>
				                <goal>run</goal>
				            </goals>
				        </execution>
				    </executions>
				</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>
			            <configuration>
			            	<excludeResources>true</excludeResources>
			            </configuration>
			          </execution>
			        </executions>
			      </plugin>
			</plugins>
			
		</pluginManagement>
		<plugins>
			<plugin>
		     	<groupId>org.sonatype.plugins</groupId>
		        <artifactId>nexus-staging-maven-plugin</artifactId>
		        <version>1.6.13</version>
		        <extensions>true</extensions>
		        <configuration>
		        	<serverId>ossrh</serverId>
		        	<nexusUrl>https://oss.sonatype.org/</nexusUrl>
		        	<autoReleaseAfterClose>true</autoReleaseAfterClose>
                    <stagingProgressTimeoutMinutes>15</stagingProgressTimeoutMinutes>
		        </configuration>
			</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>
						<!-- <configuration>
							<keyname>${gpg.keyname}</keyname>
							<passphraseServerId>${gpg.keyname}</passphraseServerId>
						</configuration> -->
					</execution>
				</executions>
			</plugin>
			<plugin>
				<artifactId>maven-release-plugin</artifactId>
				<version>2.5.2</version>
				<dependencies>
					<dependency>
						<groupId>org.apache.maven.scm</groupId>
						<artifactId>maven-scm-provider-gitexe</artifactId>
						<version>1.8.1</version>
					</dependency>
				</dependencies>
				<configuration>
					<autoVersionSubmodules>true</autoVersionSubmodules>
				</configuration>
			</plugin>
		</plugins>
	</build>

</project>
