What correct maven dependencies to specify for JBehave tutorial project?

566 views Asked by At

I want to study the java spring portion of the Jbehave-tutorial project at https://github.com/jbehave/jbehave-tutorial.

The README.MD states the REQUIREMENTS for building at the bottom:

Building the tutorial has been tested with Maven 3.0.5-3.2.1 and JDK 1.6-1.7. Newer versions of Maven and JDK should work but could also present issues.If you find any, please report them via JIRA

On my computer My Computer I am running Maven Version: 3.3.3 and STS Version: 3.6.4 for 64-bit Windows 7.

I really don't want to make an Atlassian account in order to resolve this issue if I can resolve it on StackOverflow.

So these are the steps I took to build JBehave-tutorial on my machine:

  1. git clone https://github.com/jbehave/jbehave-tutorial.git
  2. mvn clean install -Pstable # Issued in the main parent folder 'jbehave-tutorial' enter image description here
  3. Imported into Spring Tool Suite (STS) as an existing maven project.
  4. Received the following errors in STS: enter image description here

enter image description here

This lead me to believe that maven did not correctly download and build those dependencies so I looked into the .m2\repository\org\jbehave folder and this is what I seen. enter image description here

Did anybody else get this to work? What workarounds are there? What correct maven dependencies to specify for JBehave tutorial project in pom.xml(s)?

2

There are 2 answers

0
John Deverall On

I'm not immediately clear on your specific situation but here are dependencies required to use JBehave without Spring. (example pom below - you'll only need gherkin if your user scenarios are in gherkin).

https://stackoverflow.com/questions/30685909/jbehave-dependencies-not-available-in-central-maven-repo

I'm also going to hazard a guess that you're going to need the below at the appropriate version.

<dependency>
    <groupId>org.jbehave</groupId>
    <artifactId>jbehave-spring</artifactId>
    <version>4.0.3</version>
</dependency>
0
wujek.oczko On

Maven cannot find "SNAPSHOT" dependencies. You need to google "Maven + dependency name without specified version" and check what is the latest version of them and make appropriate changes in pom file.

For example I have jbehave-web-runner version 3.6-beta-2 NOT 3.6-SNAPSHOT.