Monday, July 26, 2010

$ gem list gherkin cucumber
*** LOCAL GEMS ***
gherkin (2.2.0, 2.0.2)

$ gem install cucumber
ERROR: Error installing cucumber:
cucumber requires gherkin (~> 2.1.4, runtime)

The following command didn't work too
$gem install gherkin cucumber
You have to install gherkin 2.1.4 or 2.1.5 first.
$gem install gherkin --version 2.1.5

See "Specifying Versions" of RubyGems here

Thursday, July 22, 2010

Run cuke4duke from Eclipse

For a project using cuke4duke-maven-plugin, you can run integration test using Eclipse launcher, but you need to install the dependent packages into local repository. This is not convenient because you may change the dependent package in your workspace to make testes pass.

Just turn on "Resolve workspace artifacts" in "Run Configurations" dialog, and you don't have to install them.

Maven build without installing dependent packages in local repository

If you split your large project into several maven projects, and put them in sibling folders as follows:

+- parent
+- api
+- persistence
+- core

and core depends on api and persistence, while persistence depends on api. You can run maven command in parent/ to build them all without installing the packages into local maven repository:

parent $ mvn clean package

If you just want to build persistence, and you go to the folder core, then run maven, you will be asked to install api into repository. You can overcome this by running this command in parent folder:

parent $ mvn -o -am -pl groupId:core clean package

because all packages are in sibling folders, you may want to try this command:

parent $ mvn -o -am -pl ../core clean package

But this won't work and you may get an error message like "Couldn't find specified project in module list: M:\..\parent\..\core". Check this: MNG-4262.