Skip to content

Commit

Permalink
Fix version/newline/maven problems
Browse files Browse the repository at this point in the history
  • Loading branch information
aslakhellesoy committed Aug 20, 2011
1 parent ea8afce commit d2bddb5
Show file tree
Hide file tree
Showing 55 changed files with 151 additions and 156 deletions.
6 changes: 2 additions & 4 deletions clojure/clojure.iml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,17 @@
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/target/generated-sources/annotations" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/target/generated-sources/annotations" isTestSource="false" />
<excludeFolder url="file://$MODULE_DIR$/target/classes" />
<excludeFolder url="file://$MODULE_DIR$/target/maven-archiver" />
<excludeFolder url="file://$MODULE_DIR$/target/surefire" />
<excludeFolder url="file://$MODULE_DIR$/target/test-classes" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="core" />
<orderEntry type="library" name="Maven: gherkin:gherkin:2.4.13" level="project" />
<orderEntry type="library" name="Maven: gherkin:gherkin:2.4.14" level="project" />
<orderEntry type="library" name="Maven: com.googlecode.json-simple:json-simple:1.1" level="project" />
<orderEntry type="library" name="Maven: net.iharder:base64:2.3.8" level="project" />
<orderEntry type="library" name="Maven: com.beust:jcommander:1.7" level="project" />
Expand Down
5 changes: 3 additions & 2 deletions clojure/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

<parent>
<groupId>cucumber</groupId>
<artifactId>parent</artifactId>
<artifactId>cucumber-jvm</artifactId>
<relativePath>../pom.xml</relativePath>
<version>0.4.3-SNAPSHOT</version>
<version>1.0.0-SNAPSHOT</version>
</parent>

<artifactId>clojure</artifactId>
Expand All @@ -19,6 +19,7 @@
<dependency>
<groupId>cucumber</groupId>
<artifactId>core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.clojure</groupId>
Expand Down
8 changes: 2 additions & 6 deletions core/core.iml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,16 @@
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/target/generated-sources/test-annotations" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/target/generated-sources/test-annotations" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/target/generated-sources/annotations" isTestSource="false" />
<excludeFolder url="file://$MODULE_DIR$/target/classes" />
<excludeFolder url="file://$MODULE_DIR$/target/maven-archiver" />
<excludeFolder url="file://$MODULE_DIR$/target/surefire" />
<excludeFolder url="file://$MODULE_DIR$/target/surefire-reports" />
<excludeFolder url="file://$MODULE_DIR$/target/test-classes" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Maven: gherkin:gherkin:2.4.13" level="project" />
<orderEntry type="library" name="Maven: gherkin:gherkin:2.4.14" level="project" />
<orderEntry type="library" name="Maven: com.googlecode.json-simple:json-simple:1.1" level="project" />
<orderEntry type="library" name="Maven: net.iharder:base64:2.3.8" level="project" />
<orderEntry type="library" name="Maven: com.beust:jcommander:1.7" level="project" />
Expand Down
4 changes: 2 additions & 2 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

<parent>
<groupId>cucumber</groupId>
<artifactId>parent</artifactId>
<artifactId>cucumber-jvm</artifactId>
<relativePath>../pom.xml</relativePath>
<version>0.4.3-SNAPSHOT</version>
<version>1.0.0-SNAPSHOT</version>
</parent>

<artifactId>core</artifactId>
Expand Down
4 changes: 2 additions & 2 deletions core/src/main/java/cucumber/classpath/Classpath.java
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ private static void scanJar(URL jarDir, String pathPrefix, String suffix, Consum
private static String filePath(String jarUrl) {
String pathWithProtocol = jarUrl.substring(0, jarUrl.indexOf("!/"));
String[] segments = pathWithProtocol.split(":");
// WINDOWS: jar:file:/C:/Users/ahellesoy/scm/cucumber-jvm/java/target/java-0.4.3-SNAPSHOT.jar
// POSIX: jar:file:/Users/ahellesoy/scm/cucumber-jvm/java/target/java-0.4.3-SNAPSHOT.jar
// WINDOWS: jar:file:/C:/Users/ahellesoy/scm/cucumber-jvm/java/target/java-1.0.0-SNAPSHOT.jar
// POSIX: jar:file:/Users/ahellesoy/scm/cucumber-jvm/java/target/java-1.0.0-SNAPSHOT.jar
return segments.length == 4 ? segments[2].substring(1) + ":" + segments[3] : segments[2];
}

Expand Down
13 changes: 3 additions & 10 deletions core/src/main/java/cucumber/cli/Main.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package cucumber.cli;

import cucumber.runtime.Runtime;
import cucumber.runtime.SnippetPrinter;
import gherkin.formatter.PrettyFormatter;

import java.util.ArrayList;
Expand Down Expand Up @@ -42,17 +43,9 @@ public static void main(String[] argv) {
Runner runner = new Runner(runtime, filesOrDirs);

PrettyFormatter prettyFormatter = new PrettyFormatter(System.out, false, true);

runner.run(prettyFormatter, prettyFormatter);

List<String> snippets = runtime.getSnippets();
if (!snippets.isEmpty()) {
System.out.println();
System.out.println("You can implement missing steps with the snippets below:");
System.out.println();
for (String snippet : snippets) {
System.out.println(snippet);
}
}
new SnippetPrinter(System.out).printSnippets(runtime);

}
}
5 changes: 2 additions & 3 deletions core/src/main/java/cucumber/junit/Cucumber.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import cucumber.io.Resource;
import cucumber.runtime.FeatureBuilder;
import cucumber.runtime.Runtime;
import cucumber.runtime.SnippetPrinter;
import cucumber.runtime.model.CucumberFeature;
import cucumber.runtime.model.CucumberScenario;
import gherkin.formatter.model.Feature;
Expand All @@ -26,9 +27,7 @@ private static Runtime runtime(Class testClass) {
java.lang.Runtime.getRuntime().addShutdownHook(new Thread() {
@Override
public void run() {
for (String snippet : runtime.getSnippets()) {
System.out.println(snippet);
}
new SnippetPrinter(System.out).printSnippets(runtime);
}
});
return runtime;
Expand Down
25 changes: 25 additions & 0 deletions core/src/main/java/cucumber/runtime/SnippetPrinter.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package cucumber.runtime;

import gherkin.formatter.NiceAppendable;

import java.util.List;

public class SnippetPrinter {
private final NiceAppendable out;

public SnippetPrinter(Appendable out) {
this.out = new NiceAppendable(out);
}

public void printSnippets(Runtime runtime) {
List<String> snippets = runtime.getSnippets();
if (!snippets.isEmpty()) {
out.append("\n");
out.println("You can implement missing steps with the snippets below:");
out.println();
for (String snippet : snippets) {
out.println(snippet);
}
}
}
}
24 changes: 0 additions & 24 deletions core/src/main/java/cucumber/runtime/SummaryReporter.java

This file was deleted.

2 changes: 1 addition & 1 deletion core/src/test/java/cucumber/runtime/ClasspathTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public void consume(Resource resource) {
}
});
assertEquals(Arrays.asList("cucumber/runtime/bar.xyz", "cucumber/runtime/foo.xyz"), paths);
assertEquals("BAR", resources.get(0).getString());
assertEquals("BAR", resources.get(0).getString().trim());
}

@Test
Expand Down
2 changes: 1 addition & 1 deletion core/src/test/resources/cucumber/runtime/bar.xyz
Original file line number Diff line number Diff line change
@@ -1 +1 @@
BAR
BAR
2 changes: 1 addition & 1 deletion core/src/test/resources/cucumber/runtime/foo.xyz
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FOO
FOO
2 changes: 1 addition & 1 deletion core/src/test/resources/cucumber/test/a.feature
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Feature: fa
Scenario: sa
Given ga
Given ga
2 changes: 1 addition & 1 deletion core/src/test/resources/cucumber/test/b/c.feature
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Feature: fb
Scenario: sb
Given gb
When wb
When wb
6 changes: 2 additions & 4 deletions cucumber-ant/cucumber-ant.iml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,15 @@
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/target/generated-sources/annotations" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<excludeFolder url="file://$MODULE_DIR$/target/classes" />
<excludeFolder url="file://$MODULE_DIR$/target/maven-archiver" />
<excludeFolder url="file://$MODULE_DIR$/target/surefire" />
<excludeFolder url="file://$MODULE_DIR$/target/test-classes" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="core" />
<orderEntry type="library" name="Maven: gherkin:gherkin:2.4.13" level="project" />
<orderEntry type="library" name="Maven: gherkin:gherkin:2.4.14" level="project" />
<orderEntry type="library" name="Maven: com.googlecode.json-simple:json-simple:1.1" level="project" />
<orderEntry type="library" name="Maven: net.iharder:base64:2.3.8" level="project" />
<orderEntry type="library" name="Maven: com.beust:jcommander:1.7" level="project" />
Expand Down
5 changes: 3 additions & 2 deletions cucumber-ant/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

<parent>
<groupId>cucumber</groupId>
<artifactId>parent</artifactId>
<artifactId>cucumber-jvm</artifactId>
<relativePath>../pom.xml</relativePath>
<version>0.4.3-SNAPSHOT</version>
<version>1.0.0-SNAPSHOT</version>
</parent>

<artifactId>cucumber-ant</artifactId>
Expand All @@ -19,6 +19,7 @@
<dependency>
<groupId>cucumber</groupId>
<artifactId>core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
Expand Down
30 changes: 26 additions & 4 deletions cucumber-jvm.ipr
Original file line number Diff line number Diff line change
Expand Up @@ -296,15 +296,37 @@
<root url="jar://$MAVEN_REPOSITORY$/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1-sources.jar!/" />
</SOURCES>
</library>
<library name="Maven: gherkin:gherkin:2.4.13">
<library name="Maven: gherkin:gherkin:2.4.14">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/gherkin/gherkin/2.4.13/gherkin-2.4.13.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/gherkin/gherkin/2.4.14/gherkin-2.4.14.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/gherkin/gherkin/2.4.13/gherkin-2.4.13-javadoc.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/gherkin/gherkin/2.4.14/gherkin-2.4.14-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/gherkin/gherkin/2.4.13/gherkin-2.4.13-sources.jar!/" />
<root url="jar://$MAVEN_REPOSITORY$/gherkin/gherkin/2.4.14/gherkin-2.4.14-sources.jar!/" />
</SOURCES>
</library>
<library name="Maven: gherkin:gherkin:2.4.14">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/gherkin/gherkin/2.4.14/gherkin-2.4.14.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/gherkin/gherkin/2.4.14/gherkin-2.4.14-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/gherkin/gherkin/2.4.14/gherkin-2.4.14-sources.jar!/" />
</SOURCES>
</library>
<library name="Maven: gherkin:gherkin:2.4.14">
<CLASSES>
<root url="jar://$MAVEN_REPOSITORY$/gherkin/gherkin/2.4.14/gherkin-2.4.14.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://$MAVEN_REPOSITORY$/gherkin/gherkin/2.4.14/gherkin-2.4.14-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://$MAVEN_REPOSITORY$/gherkin/gherkin/2.4.14/gherkin-2.4.14-sources.jar!/" />
</SOURCES>
</library>
<library name="Maven: junit:junit:4.8.2">
Expand Down
4 changes: 2 additions & 2 deletions examples/java-calculator/java-calculator.iml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Maven: gherkin:gherkin:2.4.13" level="project" />
<orderEntry type="library" name="Maven: gherkin:gherkin:2.4.14" level="project" />
<orderEntry type="library" name="Maven: com.googlecode.json-simple:json-simple:1.1" level="project" />
<orderEntry type="library" name="Maven: net.iharder:base64:2.3.8" level="project" />
<orderEntry type="module" module-name="picocontainer" />
Expand Down
8 changes: 4 additions & 4 deletions examples/java-calculator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

<parent>
<groupId>cucumber</groupId>
<artifactId>parent</artifactId>
<artifactId>cucumber-jvm</artifactId>
<relativePath>../../pom.xml</relativePath>
<version>0.4.3-SNAPSHOT</version>
<version>1.0.0-SNAPSHOT</version>
</parent>

<artifactId>java-calculator</artifactId>
Expand All @@ -19,12 +19,12 @@
<dependency>
<groupId>gherkin</groupId>
<artifactId>gherkin</artifactId>
<version>2.4.12</version>
<version>2.4.14</version>
</dependency>
<dependency>
<groupId>cucumber</groupId>
<artifactId>picocontainer</artifactId>
<version>0.4.3-SNAPSHOT</version>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ public void PI() {
public Number value() {
return stack.get(stack.size() - 1);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ Feature: Basic Arithmetic
Scenario: Adding
# Try to change one of the values below to provoke a failure
When I add 4 and 5
Then the result is 9
Then the result is 9
2 changes: 1 addition & 1 deletion groovy/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
<arg value="cucumber/runtime"/>
</java>
</target>
</project>
</project>
8 changes: 3 additions & 5 deletions groovy/groovy.iml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,18 @@
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/target/generated-sources/test-annotations" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/target/generated-sources/annotations" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/target/generated-sources/test-annotations" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/target/generated-sources/annotations" isTestSource="false" />
<excludeFolder url="file://$MODULE_DIR$/target/classes" />
<excludeFolder url="file://$MODULE_DIR$/target/maven-archiver" />
<excludeFolder url="file://$MODULE_DIR$/target/surefire" />
<excludeFolder url="file://$MODULE_DIR$/target/test-classes" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="core" />
<orderEntry type="library" name="Maven: gherkin:gherkin:2.4.13" level="project" />
<orderEntry type="library" name="Maven: gherkin:gherkin:2.4.14" level="project" />
<orderEntry type="library" name="Maven: com.googlecode.json-simple:json-simple:1.1" level="project" />
<orderEntry type="library" name="Maven: net.iharder:base64:2.3.8" level="project" />
<orderEntry type="library" name="Maven: com.beust:jcommander:1.7" level="project" />
Expand Down
Loading

0 comments on commit d2bddb5

Please sign in to comment.