-
-
Notifications
You must be signed in to change notification settings - Fork 53
Closed
Labels
Description
Hi
I'm using Maven to not only download the WebDrivers, but also to launch Selenium. My POM file contains the following:
<build>
<plugins>
<plugin>
<groupId>com.lazerycode.selenium</groupId>
<artifactId>driver-binary-downloader-maven-plugin</artifactId>
<version>1.0.7</version>
<executions>
<execution>
<goals>
<goal>selenium</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<id>hub</id>
<phase>test-compile</phase>
<configuration>
<target>
<echo message="Launching Selenium Hub"/>
<java classname="org.openqa.grid.selenium.GridLauncher"
classpathref="maven.test.classpath"
failonerror="true"
fork="false">
<arg line="-role hub"/>
</java>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
<execution>
<id>node</id>
<phase>test-compile</phase>
<configuration>
<target>
<echo message="Launching Selenium Node"/>
<java classname="org.openqa.grid.selenium.GridLauncher"
classpathref="maven.test.classpath"
failonerror="true"
fork="false">
<arg line="-role node -nodeConfig selenium/${seleniumNodeConfig}"/>
</java>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>When I run mvn test, it fires up the Selenium Hub and Node, then downloads the binaries, then tries to fire up Selenium again, obviously failing because its already running (I don't want to turn off failonerror for that). Doesn't seem to matter how I change phases, this always happens. Any idea?