Thanks for pointing me in the right direction, now I have all the examples 
working. This is what I did (just in case it helps anyone else):

-          Checked out the jbehave-web codebase as pointed out below

-          Ran the mvn command (this produced errors when executing the test 
cases)

-          From eclipse (with m2e plugin), did a File->Import-> Existing Maven 
Projects and selected the root dir where I checked out the code. Now I was able 
to run TraderWebStories as a Junit

-          On the TraderWebStories contructor I had to add this line to make it 
work
      //required in case FF is not installed on the expected dir
System.setProperty("webdriver.firefox.bin", "E:\\Program Files\\Mozilla 
Firefox\\firefox.exe");

After this I was able to run the trader-webdriver examples successfully

Thanks,
Enrique

From: Mauro Talevi [mailto:[email protected]]
Sent: Friday, May 04, 2012 3:11 AM
To: [email protected]
Subject: Re: [jbehave-user] Help getting the trader-runner-webdriver example

Hi Jorge,

what are you trying to do?  The trader-runner-webdriver is not meant as a 
dependency you can declare.  It's a module that contains the stories run using 
the selenium webdriver API.

If you want to build the examples, checkout out the entire jbehave-web codebase 
https://github.com/jbehave/jbehave-web/tree/master and

mvn clean install -Pexamples

If you are looking to get started with Maven and webdriver, I suggest to use an 
archetype:

mvn archetype:generate -Dfilter=org.jbehave:jbehave

Choosing archetype 7 or 8.

More on using archetypes with JBehave:  
http://jbehave.org/reference/stable/archetypes.html

Cheers

On 03/05/2012 20:57, Jorge Pombar wrote:
First of all thanks for developing such a great, interesting and useful 
framework. I'm brand new to Maven so please bare with my very basic questions.
I'm having issues getting the trader-runner-webdriver from gitHub. I know that 
I'm probably missing something very basic.

Thanks in advance for your help.

Here is the pom.xml file I have:
<project 
xmlns="http://maven.apache.org/POM/4.0.0";<http://maven.apache.org/POM/4.0.0> 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";<http://www.w3.org/2001/XMLSchema-instance>
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";<http://maven.apache.org/POM/4.0.0http:/maven.apache.org/maven-v4_0_0.xsd>>
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.mycompany.app</groupId>
  <artifactId>my-app</artifactId>
  <packaging>jar</packaging>
  <version>1.0-SNAPSHOT</version>
  <name>my-app</name>
  <url>http://maven.apache.org</url>
  <dependencies>
    <dependency>
      <groupId>org.jbehave.web.examples</groupId>
      <artifactId>jbehave-web-trader-webdriver</artifactId>
      <version>3.6-SNAPSHOT</version>
    </dependency>
  </dependencies>
  <repositories>
                    <repository>
                        <id>org.jbehave.web.examples</id>
                                                
<url>https://github.com/jbehave/jbehave-web/tree/master/examples</url>
                    </repository>
  </repositories>
</project>

And here is the output/error I get from when running mvn install:
$ mvn install
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building my-app 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: https://github.com/jbehave/jbehave-web/tree/master/examples/org/jbe
have/web/examples/jbehave-web-trader-webdriver/3.6-SNAPSHOT/maven-metadata.xml
Downloading: https://github.com/jbehave/jbehave-web/tree/master/examples/org/jbe
have/web/examples/jbehave-web-trader-webdriver/3.6-SNAPSHOT/jbehave-web-trader-w
ebdriver-3.6-SNAPSHOT.pom
[WARNING] The POM for org.jbehave.web.examples:jbehave-web-trader-webdriver:jar:
3.6-SNAPSHOT is missing, no dependency information available
Downloading: https://github.com/jbehave/jbehave-web/tree/master/examples/org/jbe
have/web/examples/jbehave-web-trader-webdriver/3.6-SNAPSHOT/jbehave-web-trader-w
ebdriver-3.6-SNAPSHOT.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.532s
[INFO] Finished at: Thu May 03 11:48:14 PDT 2012
[INFO] Final Memory: 3M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project my-app: Could not resolve dependencies
 for project com.mycompany.app:my-app:jar:1.0-SNAPSHOT: Could not find artifact
org.jbehave.web.examples:jbehave-web-trader-webdriver:jar:3.6-SNAPSHOT in org.jb
ehave.web.examples (https://github.com/jbehave/jbehave-web/tree/master/examples)
 -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyReso
lutionException

Thanks,
Enrique


Reply via email to