0

I'm experiencing various compile/run errors when I try the Sauce Labs Java tutorial. These errors are different when I run Maven in the command line and in Eclipse (Juno)

The java tutorial for Sauce Labs shows the Maven command to generate a JUnit based project

mvn archetype:generate -DarchetypeRepository=http://repository-saucelabs.forge.cloudbees.com/release -DarchetypeGroupId=com.saucelabs -DarchetypeArtifactId=quickstart-webdriver-junit -DarchetypeVersion=1.0.17 -DsauceUserName=username -DsauceAccessKey=access_key

The folder structure, maven pom file, and the code is generated by this command and the tutorial instructs the user to change to the newly created project folder and run the following command

mvn test

At this point I am getting a java.lang.ClassNotFoundException error. The org.junit.runner.notification.RunListener is apparently not found, even though I can see it in the Maven dependencies for the project (in Eclipse)

I am also getting an error saying that Maven cannot find the following library sauce_junit1.0.17.jar

gffny
  • 426
  • 5
  • 8
  • It is probably because maven is unable to download the jar file.Has the jar file downloaded locally ? – Ric May 15 '13 at 19:47
  • may be you need to go in directory/folder where pom.xml present. – Omkar May 16 '13 at 03:17
  • The jar files were downloaded locally and I ran the command in the folder where the pom.xml is located – gffny May 17 '13 at 15:01

1 Answers1

0

I have found a fix to issue running mvn test from the command line. Change the DarchetypeVersion from 1.0.17 to 1.0.18 when generating the project

mvn archetype:generate -DarchetypeRepository=http://repository-saucelabs.forge.cloudbees.com/release -DarchetypeGroupId=com.saucelabs -DarchetypeArtifactId=quickstart-webdriver-junit -DarchetypeVersion=1.0.18 -DsauceUserName=username -DsauceAccessKey=access_key

I can see that the sauce_junit jar file is in my local repo for 1.0.18 but not 1.0.17

gffny
  • 426
  • 5
  • 8