Title: [902] trunk/examples: Added noughtsandcrosses example to maven build.
Revision
902
Author
mauro
Date
2008-08-29 08:08:09 -0500 (Fri, 29 Aug 2008)

Log Message

Added noughtsandcrosses example to maven build.

Modified Paths


Added Paths

Property Changed

  • trunk/examples/noughtsandcrosses/

Diff

Property changes: trunk/examples/noughtsandcrosses

Name: svn:ignore
   + target

Added: trunk/examples/noughtsandcrosses/install-file.sh (0 => 902)

--- trunk/examples/noughtsandcrosses/install-file.sh	                        (rev 0)
+++ trunk/examples/noughtsandcrosses/install-file.sh	2008-08-29 13:08:09 UTC (rev 902)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+MVN_GOAL="mvn install:install-file"
+
+if [ $# -lt 4 ]
+then
+	echo "usage: install-file.sh <groupId> <artifactId> <version> <file>"
+	exit -1
+fi
+
+GROUP_ID=$1
+ARTIFACT_ID=$2
+VERSION=$3
+FILE=$4
+$MVN_GOAL -DgroupId=$GROUP_ID -DartifactId=$ARTIFACT_ID -Dversion=$VERSION -Dfile=$FILE -Dpackaging=jar -DgeneratePom=true 
\ No newline at end of file
Property changes on: trunk/examples/noughtsandcrosses/install-file.sh
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/examples/noughtsandcrosses/pom.xml (0 => 902)

--- trunk/examples/noughtsandcrosses/pom.xml	                        (rev 0)
+++ trunk/examples/noughtsandcrosses/pom.xml	2008-08-29 13:08:09 UTC (rev 902)
@@ -0,0 +1,24 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.jbehave</groupId>
+    <artifactId>jbehave-examples</artifactId>
+    <version>2.0-SNAPSHOT</version>
+  </parent>
+  <artifactId>jbehave-noughtsandcrosses-example</artifactId>
+  <name>JBehave Noughts And Crosses Example</name>
+
+  <dependencies>
+    <dependency>
+      <groupId>tyburn</groupId>
+      <artifactId>tyburn</artifactId>
+      <version>0.1</version>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <sourceDirectory>src/java</sourceDirectory>
+    <testSourceDirectory>src/behaviour</testSourceDirectory>
+  </build>
+</project>
\ No newline at end of file

Property changes: trunk/examples/noughtsandcrosses/scenarios

Name: svn:ignore
   + target

Added: trunk/examples/noughtsandcrosses/scenarios/pom.xml (0 => 902)

--- trunk/examples/noughtsandcrosses/scenarios/pom.xml	                        (rev 0)
+++ trunk/examples/noughtsandcrosses/scenarios/pom.xml	2008-08-29 13:08:09 UTC (rev 902)
@@ -0,0 +1,53 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.jbehave</groupId>
+    <artifactId>jbehave-examples</artifactId>
+    <version>2.0-SNAPSHOT</version>
+  </parent>
+  <artifactId>jbehave-noughtsandcrosses-example-scenarios</artifactId>
+  <name>JBehave Noughts And Crosses Example Scenarios</name>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.jbehave</groupId>
+      <artifactId>jbehave-noughtsandcrosses-example</artifactId>
+      <version>${pom.version}</version>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <sourceDirectory>${basedir}/../src/scenario</sourceDirectory>
+    <resources>
+      <resource>
+        <directory>${basedir}/../src/scenario</directory>
+        <filtering>false</filtering>
+        <excludes>
+          <exclude>**/*.java</exclude>
+        </excludes>
+      </resource>
+    </resources>
+    <plugins>
+      <plugin>
+        <groupId>org.jbehave</groupId>
+        <artifactId>jbehave-maven-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>run-scenarios-listed</id>
+            <phase>integration-test</phase>
+            <configuration>
+              <scenarioClassNames>
+                <scenarioClassName>com.lunivore.noughtsandcrosses.PlayersCanHazTurns</scenarioClassName>
+                <scenarioClassName>com.lunivore.noughtsandcrosses.PlayersCanTakeTurns</scenarioClassName>
+              </scenarioClassNames>
+            </configuration>
+            <goals>
+              <goal>run-scenarios</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+</project>
\ No newline at end of file

Modified: trunk/examples/noughtsandcrosses/src/scenario/com/lunivore/noughtsandcrosses/PlayersCanHazTurns.java (901 => 902)

--- trunk/examples/noughtsandcrosses/src/scenario/com/lunivore/noughtsandcrosses/PlayersCanHazTurns.java	2008-08-28 23:44:32 UTC (rev 901)
+++ trunk/examples/noughtsandcrosses/src/scenario/com/lunivore/noughtsandcrosses/PlayersCanHazTurns.java	2008-08-29 13:08:09 UTC (rev 902)
@@ -3,6 +3,9 @@
 import org.jbehave.scenario.MostUsefulConfiguration;
 import org.jbehave.scenario.Scenario;
 import org.jbehave.scenario.definition.KeyWords;
+import org.jbehave.scenario.parser.PatternScenarioParser;
+import org.jbehave.scenario.parser.ScenarioFileLoader;
+import org.jbehave.scenario.parser.UnderscoredCamelCaseResolver;
 
 import com.lunivore.noughtsandcrosses.steps.LolCatzSteps;
 
@@ -19,4 +22,18 @@
             }
         }, new LolCatzSteps());
     }
+
+    public PlayersCanHazTurns(final ClassLoader classLoader) {
+        super(new MostUsefulConfiguration() {
+            public KeyWords keywords() {
+                return new KeyWords("I can haz", "Gief", "Wen", "Den", "And");
+            }
+            public ScenarioFileLoader forDefiningScenarios() {
+                return new ScenarioFileLoader(new UnderscoredCamelCaseResolver(), classLoader,
+                        new PatternScenarioParser(this));
+            }
+        }, new LolCatzSteps());
+    }
+    
 }
+

Modified: trunk/examples/noughtsandcrosses/src/scenario/com/lunivore/noughtsandcrosses/PlayersCanTakeTurns.java (901 => 902)

--- trunk/examples/noughtsandcrosses/src/scenario/com/lunivore/noughtsandcrosses/PlayersCanTakeTurns.java	2008-08-28 23:44:32 UTC (rev 901)
+++ trunk/examples/noughtsandcrosses/src/scenario/com/lunivore/noughtsandcrosses/PlayersCanTakeTurns.java	2008-08-29 13:08:09 UTC (rev 902)
@@ -1,6 +1,10 @@
 package com.lunivore.noughtsandcrosses;
 
+import org.jbehave.scenario.MostUsefulConfiguration;
 import org.jbehave.scenario.Scenario;
+import org.jbehave.scenario.parser.PatternScenarioParser;
+import org.jbehave.scenario.parser.ScenarioFileLoader;
+import org.jbehave.scenario.parser.UnderscoredCamelCaseResolver;
 
 import com.lunivore.noughtsandcrosses.steps.GridSteps;
 
@@ -10,4 +14,12 @@
         super(new GridSteps());
     }
 
+    public PlayersCanTakeTurns(final ClassLoader classLoader) {
+        super(new MostUsefulConfiguration() {
+            public ScenarioFileLoader forDefiningScenarios() {
+                return new ScenarioFileLoader(new UnderscoredCamelCaseResolver(), classLoader,
+                        new PatternScenarioParser(this));
+            }
+        }, new GridSteps());
+    }
 }

Modified: trunk/examples/pom.xml (901 => 902)

--- trunk/examples/pom.xml	2008-08-28 23:44:32 UTC (rev 901)
+++ trunk/examples/pom.xml	2008-08-29 13:08:09 UTC (rev 902)
@@ -13,6 +13,8 @@
   <modules>
     <module>gameoflife</module>
     <module>gameoflife/scenarios</module>
+    <module>noughtsandcrosses</module>
+    <module>noughtsandcrosses/scenarios</module>
     <module>trader</module>
   </modules>
 


To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email

Reply via email to