BillR
unread,Feb 19, 2013, 3:19:01 PM2/19/13Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to cu...@googlegroups.com
I'm trying to get maven working with 1.1.2 in order to put together a github pull request illustration of a bug that a colleague who is on vacation reported in the context of our gradle setup. So I'm trying to get old-version maven code working with the latest cuke jvm.
Here is the error (seems to be same dir being searched twice):
Tests in error:
initializationError(com.xoom.qa.cuke.steps.RunCukesTest): Duplicate step definitions in com.xoom.qa.cuke.steps.RegularSteps.doomedGiven() in file:/home/xoom/cuke_bug/target/test-classes/ and com.xoom.qa.cuke.steps.RegularSteps.doomedGiven() in file:/home/xoom/cuke_bug/target/test-classes/
All the classes in that tree:
~/cuke_bug> find /home/xoom/cuke_bug/target/test-classes/ -name "*.class"
/home/xoom/cuke_bug/target/test-classes/com/xoom/qa/cuke/steps/RegularSteps.class
/home/xoom/cuke_bug/target/test-classes/com/xoom/qa/cuke/steps/BeforeAfterSteps.class
/home/xoom/cuke_bug/target/test-classes/com/xoom/qa/cuke/steps/RunCukesTest.class
Here is the surefire setup:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire.version}</version>
<configuration>
<argLine>-Xmx2048m</argLine>
<systemProperties>
<property>
<!-- When Cucumber-JVM supports replace/append of cucumber.options, this can be removed, along with the
<tags> property above. msp 6/14/2012 -->
<name>cucumber.options</name>
<value>--tags ${tags} --format pretty --monochrome --glue classpath:com/xoom/qa/cuke/steps</value>
</property>
</systemProperties>
</configuration>
...
Here is the one java file that exists with the Given method:
package com.xoom.qa.cuke.steps;
import cucumber.api.java.en.Given;
import static org.junit.Assert.*;
public class RegularSteps {
@Given("^a step that fails$")
public void doomedGiven() {
throw new RuntimeException("Step fails..");
}
}
And here is the junit file:
package com.xoom.qa.cuke.steps;
import cucumber.api.junit.Cucumber;
import org.junit.runner.RunWith;
@RunWith(Cucumber.class)
//@Cucumber.Options(format="pretty", monochrome = true)
public class RunCukesTest {
}
I'm not seeing why cuke is finding the same file twice.
Thanks,
Bill