<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1966655763081286770</id><updated>2012-02-13T23:50:08.056-08:00</updated><title type='text'>aluedeke</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.ludeke.net/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1966655763081286770/posts/default'/><link rel='alternate' type='text/html' href='http://www.ludeke.net/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Andreas Lüdeke</name><uri>https://profiles.google.com/107925712014656831609</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>2</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1966655763081286770.post-5194701098781946505</id><published>2011-10-05T07:29:00.000-07:00</published><updated>2011-10-05T07:31:01.936-07:00</updated><title type='text'>Getting started with ATDD and Cucumber JVM</title><content type='html'>&lt;div style="text-align: justify;"&gt;Since several weeks i planned to prepare an simple example for an upcoming talk about Acceptance Test Driven Development (ATDD). I decided to play with Cucumber as it seems to be the most adopted ATDD framework in the wild.&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;As Cucumber is a Ruby framework and i would like to use it in Java together with Maven I had a look at cuke4duke which should bring those 2 worlds&amp;nbsp;together. I tried several examples but already failed to setup a very basic one. While looking around for an solution i came across an&amp;nbsp;&lt;a href="http://thomassundberg.wordpress.com/2011/09/16/test-drive-an-implementation-using-an-executable-specification/"&gt;blog post&lt;/a&gt; from Thomas Sundberg. he pointed to the successor project of cuke4duke which is named&amp;nbsp;&lt;a href="https://github.com/cucumber/cucumber-jvm"&gt;cucumber-jvm&lt;/a&gt;. It's a pure Java implementation :-) of cucumber and supports&amp;nbsp;several&amp;nbsp;other languages like Ruby, Groovy, Python etc. From my point of view is has several advantages in contrast to cuke4duke:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;easy setup&lt;/li&gt;&lt;ul&gt;&lt;li&gt;It took me less than 5 minutes to setup the basic example.&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;faster&lt;/li&gt;&lt;ul&gt;&lt;li&gt;cucumber-jvm provides a custom JUnit Runner to execute tests. No need to trigger maven to execute your integration test. Thus the startup time is drastically reduced.&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;less magic&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Features and&amp;nbsp;their&amp;nbsp;implementation are linked via @Feature annotations. No need to scan your complete project anymore&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;div&gt;Ok now its time to check my litlle &lt;a href="https://github.com/aluedeke/cucumber-jvm-example"&gt;example project&lt;/a&gt;:&lt;br /&gt;&lt;br /&gt;project structure:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-aCy3ffRCkyg/ToxoU5UJdnI/AAAAAAAAABA/LD_5FINtUKQ/s1600/cucumber-example-project-structure.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-aCy3ffRCkyg/ToxoU5UJdnI/AAAAAAAAABA/LD_5FINtUKQ/s1600/cucumber-example-project-structure.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;As cucumber-jvm isn't available as stable version it must be resolved from a snapshot repo:&lt;br /&gt;pom.xml:&lt;/div&gt;&lt;pre style="background-image: URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt; &amp;lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  &lt;br /&gt;      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&amp;gt;  &lt;br /&gt;      &amp;lt;modelVersion&amp;gt;4.0.0&amp;lt;/modelVersion&amp;gt;  &lt;br /&gt;      &amp;lt;groupId&amp;gt;net.ludeke.examples&amp;lt;/groupId&amp;gt;  &lt;br /&gt;      &amp;lt;artifactId&amp;gt;cucumber-jvm-example&amp;lt;/artifactId&amp;gt;  &lt;br /&gt;      &amp;lt;version&amp;gt;0.0.1-SNAPSHOT&amp;lt;/version&amp;gt;  &lt;br /&gt;   &lt;br /&gt;      &amp;lt;properties&amp;gt;  &lt;br /&gt;           &amp;lt;project.build.sourceEncoding&amp;gt;UTF-8&amp;lt;/project.build.sourceEncoding&amp;gt;  &lt;br /&gt;      &amp;lt;/properties&amp;gt;  &lt;br /&gt;   &lt;br /&gt;      &amp;lt;build&amp;gt;  &lt;br /&gt;           &amp;lt;plugins&amp;gt;  &lt;br /&gt;                &amp;lt;plugin&amp;gt;  &lt;br /&gt;                     &amp;lt;groupId&amp;gt;org.apache.maven.plugins&amp;lt;/groupId&amp;gt;  &lt;br /&gt;                     &amp;lt;artifactId&amp;gt;maven-compiler-plugin&amp;lt;/artifactId&amp;gt;  &lt;br /&gt;                     &amp;lt;configuration&amp;gt;  &lt;br /&gt;                          &amp;lt;source&amp;gt;1.6&amp;lt;/source&amp;gt;  &lt;br /&gt;                          &amp;lt;target&amp;gt;1.6&amp;lt;/target&amp;gt;  &lt;br /&gt;                     &amp;lt;/configuration&amp;gt;  &lt;br /&gt;                &amp;lt;/plugin&amp;gt;  &lt;br /&gt;           &amp;lt;/plugins&amp;gt;  &lt;br /&gt;      &amp;lt;/build&amp;gt;  &lt;br /&gt;   &lt;br /&gt;      &amp;lt;dependencies&amp;gt;  &lt;br /&gt;           &amp;lt;!-- JUnit --&amp;gt;  &lt;br /&gt;           &amp;lt;dependency&amp;gt;  &lt;br /&gt;                &amp;lt;groupId&amp;gt;junit&amp;lt;/groupId&amp;gt;  &lt;br /&gt;                &amp;lt;artifactId&amp;gt;junit&amp;lt;/artifactId&amp;gt;  &lt;br /&gt;                &amp;lt;version&amp;gt;4.8.2&amp;lt;/version&amp;gt;  &lt;br /&gt;                &amp;lt;scope&amp;gt;test&amp;lt;/scope&amp;gt;  &lt;br /&gt;           &amp;lt;/dependency&amp;gt;  &lt;br /&gt;           &amp;lt;!-- Cucumber --&amp;gt;  &lt;br /&gt;           &amp;lt;dependency&amp;gt;  &lt;br /&gt;                &amp;lt;groupId&amp;gt;info.cukes&amp;lt;/groupId&amp;gt;  &lt;br /&gt;                &amp;lt;artifactId&amp;gt;cucumber-junit&amp;lt;/artifactId&amp;gt;  &lt;br /&gt;                &amp;lt;version&amp;gt;1.0.0-SNAPSHOT&amp;lt;/version&amp;gt;  &lt;br /&gt;                &amp;lt;scope&amp;gt;test&amp;lt;/scope&amp;gt;  &lt;br /&gt;           &amp;lt;/dependency&amp;gt;  &lt;br /&gt;           &amp;lt;dependency&amp;gt;  &lt;br /&gt;                &amp;lt;groupId&amp;gt;info.cukes&amp;lt;/groupId&amp;gt;  &lt;br /&gt;                &amp;lt;artifactId&amp;gt;cucumber-java&amp;lt;/artifactId&amp;gt;  &lt;br /&gt;                &amp;lt;version&amp;gt;1.0.0-SNAPSHOT&amp;lt;/version&amp;gt;  &lt;br /&gt;                &amp;lt;scope&amp;gt;test&amp;lt;/scope&amp;gt;  &lt;br /&gt;           &amp;lt;/dependency&amp;gt;  &lt;br /&gt;           &amp;lt;dependency&amp;gt;  &lt;br /&gt;                &amp;lt;groupId&amp;gt;info.cukes&amp;lt;/groupId&amp;gt;  &lt;br /&gt;                &amp;lt;artifactId&amp;gt;cucumber-picocontainer&amp;lt;/artifactId&amp;gt;  &lt;br /&gt;                &amp;lt;version&amp;gt;1.0.0-SNAPSHOT&amp;lt;/version&amp;gt;  &lt;br /&gt;                &amp;lt;scope&amp;gt;test&amp;lt;/scope&amp;gt;  &lt;br /&gt;           &amp;lt;/dependency&amp;gt;  &lt;br /&gt;           &amp;lt;dependency&amp;gt;  &lt;br /&gt;                &amp;lt;groupId&amp;gt;org.picocontainer&amp;lt;/groupId&amp;gt;  &lt;br /&gt;                &amp;lt;artifactId&amp;gt;picocontainer&amp;lt;/artifactId&amp;gt;  &lt;br /&gt;                &amp;lt;version&amp;gt;2.10.2&amp;lt;/version&amp;gt;  &lt;br /&gt;                &amp;lt;scope&amp;gt;test&amp;lt;/scope&amp;gt;  &lt;br /&gt;           &amp;lt;/dependency&amp;gt;  &lt;br /&gt;      &amp;lt;/dependencies&amp;gt;  &lt;br /&gt;   &lt;br /&gt;      &amp;lt;repositories&amp;gt;  &lt;br /&gt;           &amp;lt;repository&amp;gt;  &lt;br /&gt;                &amp;lt;id&amp;gt;sonatype-snapshots&amp;lt;/id&amp;gt;  &lt;br /&gt;                &amp;lt;url&amp;gt;https://oss.sonatype.org/content/repositories/snapshots&amp;lt;/url&amp;gt;  &lt;br /&gt;           &amp;lt;/repository&amp;gt;  &lt;br /&gt;      &amp;lt;/repositories&amp;gt;  &lt;br /&gt;   &lt;br /&gt; &amp;lt;/project&amp;gt;  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;CarMaintenance.feature:&lt;br /&gt;&lt;pre style="background-image: URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt; Feature: Daily car maintenance  &lt;br /&gt;  Cars need maintenance  &lt;br /&gt;   &lt;br /&gt; Scenario: Fuelling  &lt;br /&gt;   Given a car with 10 litres of fuel in the tank  &lt;br /&gt;   When you fill it with 50 litres of fuel  &lt;br /&gt;   Then the tank contains 60 litres  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Car.java:&lt;br /&gt;&lt;pre style="background-image: URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt; package net.ludeke.example;  &lt;br /&gt;   &lt;br /&gt; public class Car {  &lt;br /&gt;   private Integer fuelLevel;  &lt;br /&gt;   &lt;br /&gt;   public Car(int initialFuelLevel) {  &lt;br /&gt;     fuelLevel = initialFuelLevel;  &lt;br /&gt;   }  &lt;br /&gt;   &lt;br /&gt;   public void addFuel(int addedFuel) {  &lt;br /&gt;     fuelLevel = fuelLevel + addedFuel;  &lt;br /&gt;   }  &lt;br /&gt;   &lt;br /&gt;   public int getFuelLevel() {  &lt;br /&gt;     return fuelLevel;  &lt;br /&gt;   }  &lt;br /&gt; }  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;FuelCarTest.java:&lt;br /&gt;&lt;pre style="background-image: URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt; package net.ludeke.example;  &lt;br /&gt;   &lt;br /&gt; import cucumber.annotation.en.Given;  &lt;br /&gt; import cucumber.annotation.en.Then;  &lt;br /&gt; import cucumber.annotation.en.When;  &lt;br /&gt; import cucumber.junit.Cucumber;  &lt;br /&gt; import cucumber.junit.Feature;  &lt;br /&gt; import net.ludeke.example.Car;  &lt;br /&gt;   &lt;br /&gt; import org.junit.runner.RunWith;  &lt;br /&gt;   &lt;br /&gt; import static org.hamcrest.core.Is.is;  &lt;br /&gt; import static org.junit.Assert.assertThat;  &lt;br /&gt;   &lt;br /&gt; @RunWith(Cucumber.class)  &lt;br /&gt; @Feature(value = "CarMaintenance.feature")  &lt;br /&gt; public class FuelCarTest {  &lt;br /&gt;   private Car car;  &lt;br /&gt;   &lt;br /&gt;   @Given("^a car with (\\d*) litres of fuel in the tank$")  &lt;br /&gt;   public void createCar(int initialFuelLevel) {  &lt;br /&gt;     car = new Car(initialFuelLevel);  &lt;br /&gt;   }  &lt;br /&gt;   &lt;br /&gt;   @When("^you fill it with (\\d*) litres of fuel$")  &lt;br /&gt;   public void addFuel(int addedFuel) {  &lt;br /&gt;     car.addFuel(addedFuel);  &lt;br /&gt;   }  &lt;br /&gt;   &lt;br /&gt;   @Then("^the tank contains (\\d*) litres$")  &lt;br /&gt;   public void checkBalance(int expectedFuelLevel) {  &lt;br /&gt;     int actualFuelLevel = car.getFuelLevel();  &lt;br /&gt;     assertThat(actualFuelLevel, is(expectedFuelLevel));  &lt;br /&gt;   }  &lt;br /&gt; }  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;From my point of view this solution is much more straight forward for (at least) Java developers than cuke4duke.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1966655763081286770-5194701098781946505?l=www.ludeke.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ludeke.net/feeds/5194701098781946505/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.ludeke.net/2011/10/getting-started-with-atdd-and-cucumber.html#comment-form' title='3 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1966655763081286770/posts/default/5194701098781946505'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1966655763081286770/posts/default/5194701098781946505'/><link rel='alternate' type='text/html' href='http://www.ludeke.net/2011/10/getting-started-with-atdd-and-cucumber.html' title='Getting started with ATDD and Cucumber JVM'/><author><name>Andreas Lüdeke</name><uri>https://profiles.google.com/107925712014656831609</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-aCy3ffRCkyg/ToxoU5UJdnI/AAAAAAAAABA/LD_5FINtUKQ/s72-c/cucumber-example-project-structure.JPG' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1966655763081286770.post-6951720984334034159</id><published>2011-10-04T11:10:00.000-07:00</published><updated>2011-10-05T04:31:43.986-07:00</updated><title type='text'>Hosting P2 Repositories with Nexus OSS</title><content type='html'>Since a long time i had a look at Nexus and was a little bit disappointed that the P2 repository features aren't available in the open source version. Fortunately that has been changed within the last weeks:&lt;br /&gt;&lt;br /&gt;&lt;a href="https://docs.sonatype.org/display/Nexus/Nexus+OSGi+Experimental+Features+-+P2+Repository+Plugin"&gt;https://docs.sonatype.org/display/Nexus/Nexus+OSGi+Experimental+Features+-+P2+Repository+Plugin&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;With some manual effort it's now possible to expose osgi bundles from your nexus as p2 repository which makes it much easier to consume them from within eclipse or tycho.&lt;br /&gt;&lt;br /&gt;To install the new experimental plugins in nexus 1.9.2.3 download the following plugins from the sonatype nexus repository:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="https://repository.sonatype.org/index.html#nexus-search;quick~nexus-capabilities-plugin"&gt;nexus-capatibilies-plugin&lt;/a&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;version: 1.9.2.2&lt;/li&gt;&lt;li&gt;&lt;a href="https://repository.sonatype.org/index.html#nexus-search;quick~nexus-p2-bridge-plugin"&gt;nexus-p2-bridge-plugin&lt;/a&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;version: 1.0-SNAPSHOT&lt;/li&gt;&lt;li&gt;&lt;a href="https://repository.sonatype.org/index.html#nexus-search;quick~nexus-p2-repository-plugin"&gt;nexus-p2-repository-plugin&lt;/a&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;version: 1.0-SNAPSHOT&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;Please ensure that you download the *-bundle.zip files and not the *.jar files. Extract them afterwards into the&amp;nbsp;sonatype-work/nexus/plugin-repository folder of your nexus installation. Finally restart nexus to activate those plugins.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now its time to play a little bit around to speed up and simplify our maven tycho build. Thanks sonatype for this great improvement.&amp;nbsp;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1966655763081286770-6951720984334034159?l=www.ludeke.net' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.ludeke.net/feeds/6951720984334034159/comments/default' title='Kommentare zum Post'/><link rel='replies' type='text/html' href='http://www.ludeke.net/2011/10/hosting-p2-repositories-with-nexus-oss.html#comment-form' title='1 Kommentare'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1966655763081286770/posts/default/6951720984334034159'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1966655763081286770/posts/default/6951720984334034159'/><link rel='alternate' type='text/html' href='http://www.ludeke.net/2011/10/hosting-p2-repositories-with-nexus-oss.html' title='Hosting P2 Repositories with Nexus OSS'/><author><name>Andreas Lüdeke</name><uri>https://profiles.google.com/107925712014656831609</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry></feed>
