Documentation

There isn't any documentation yet apart from API docs. Documentation will be published when the first release candidate for 1.0.0 is ready.
If you are adventurous, check out the examples, read the code and ask specific questions on the Cucumber mailing list.

API Docs

Examples

You will find an example in Git under examples/java-calculator. You should be able to run basic_arithmetic.feature by running the cucumber.examples.java.calculator.basic_arithmetic_Test JUnit test from your IDE. -Or simply by running it with Maven: mvn clean install -P examples once to build it all. Then cd examples/java-calculator followed by mvn test each time you make a change. Try to make the feature fail!

IDE Setup

IntelliJ IDEA

The top level directory has a cucumber-jvm.ipr project file that references a cucumber-*.iml files.
Just run ant once (see below) and install the IvyIDEA plugin.

Now, open the cucumber-jvm.ipr project and you should be good to go.

Contributing/Hacking

To hack on Cucumber-JVM you need a JDK, Maven and Git to get the code. You also need to set your IDE/text editor to use:

UTF-8 file encoding

LF (UNIX) line endings

4 Space indent (no tabs)

Java

XML

2 Space indent (no tabs)

Gherkin

Please do not add @author tags - this project embraces collective code ownership. If you want to know who wrote some code, look in git.
When you are done, send a pull request.
If we get a pull request where an entire file is changed because of insignificant whitespace changes we cannot see what you have changed, and your contribution might get rejected.

Building Cucumber-JVM

You'll need Ant installed

export ANT_OPTS=-XX:MaxPermSize=128m
ant clean publish-artifacts

Continuous Integration

Running cross-platform Cucumber features

All Cucumber implementations (cucumber-ruby, cucumber-jvm, cucumber-js) share a common set of Cucumber features to
ensure all implementations support the same basic features. To run these you need to clone the cucumber-tck repo into your cucumber-jvm working copy:

git submodule update --init

Now you can run the cross-platform Cucumber features:

gem install bundler
bundle install
rake

Troubleshooting

Below are some common problems you might encounter while hacking on Cucumber-JVM - and solutions.

IntelliJ Idea fails to compile the generated I18n Java annotations

This can be solved by changing the Compiler settings: Preferences -> Compiler -> Java Compiler:

Contributing fixes

Fork the repository on Github, clone it and send a pull request when you have fixed something. Please commit each feature/bugfix on a separate branch as this makes it easier for us to decide what to merge and what not to merge.