Title: [770] trunk/plugins/maven/src/it/test7: Removed redundant parameter storyDirectory.

Diff

Modified: trunk/plugins/maven/src/it/test6/pom.xml (769 => 770)

--- trunk/plugins/maven/src/it/test6/pom.xml	2007-07-15 23:20:23 UTC (rev 769)
+++ trunk/plugins/maven/src/it/test6/pom.xml	2007-07-15 23:42:34 UTC (rev 770)
@@ -36,12 +36,11 @@
 						<id>run-story-1</id>
 						<phase>integration-test</phase>
 						<configuration>
-							<storyDirectory>org/jbehave/it/stories</storyDirectory>
 							<storyIncludes>
-                              <storyInclude>it*.story</storyInclude>
+                              <storyInclude>**/it*.story</storyInclude>
                             </storyIncludes>
                             <storyExcludes>
-                              <storyExclude>it.story</storyExclude>
+                              <storyExclude>**/it.story</storyExclude>
                             </storyExcludes>
 						</configuration>		
 						<goals>
@@ -52,9 +51,8 @@
                        <id>run-story-2</id>
                        <phase>integration-test</phase>
                         <configuration>
-                            <storyDirectory>org/jbehave/it/stories</storyDirectory>
                             <storyIncludes>
-                              <storyInclude>it*.story</storyInclude>
+                              <storyInclude>**/it*.story</storyInclude>
                             </storyIncludes>
                         </configuration>    
                         <goals>

Modified: trunk/plugins/maven/src/it/test7/pom.xml (769 => 770)

--- trunk/plugins/maven/src/it/test7/pom.xml	2007-07-15 23:20:23 UTC (rev 769)
+++ trunk/plugins/maven/src/it/test7/pom.xml	2007-07-15 23:42:34 UTC (rev 770)
@@ -35,9 +35,8 @@
             <id>generate-code</id>
             <phase>integration-test</phase>
             <configuration>
-              <storyDirectory>org/jbehave/it/stories</storyDirectory>
               <storyIncludes>
-                <storyInclude>generated.story</storyInclude>
+                <storyInclude>**/generated.story</storyInclude>
               </storyIncludes>
             </configuration>
             <goals>

Modified: trunk/plugins/maven/src/main/java/org/jbehave/mojo/AbstractStoryMojo.java (769 => 770)

--- trunk/plugins/maven/src/main/java/org/jbehave/mojo/AbstractStoryMojo.java	2007-07-15 23:20:23 UTC (rev 769)
+++ trunk/plugins/maven/src/main/java/org/jbehave/mojo/AbstractStoryMojo.java	2007-07-15 23:42:34 UTC (rev 770)
@@ -1,6 +1,5 @@
 package org.jbehave.mojo;
 
-import java.io.File;
 import java.net.MalformedURLException;
 import java.util.ArrayList;
 import java.util.List;
@@ -39,13 +38,6 @@
     private String storyPath;
 
     /**
-     * Directory containing multiple stories, relative to the sourceDirectory
-     * 
-     * @parameter
-     */
-    private String storyDirectory;
-
-    /**
      * Story include filters, relative to the storyDirectory
      * 
      * @parameter
@@ -110,23 +102,19 @@
     }
 
     private List listStoryPaths() {
-        List storyPaths = pathFinder.listPaths(getStorySourceDirectory().getPath(), storyDirectory, storyIncludes,
+        List storyPaths = pathFinder.listPaths(getRootSourceDirectory(), null, storyIncludes,
                 storyExcludes);
         getLog().debug("Listed story paths " + storyPaths);
         return storyPaths;
     }
 
-    private String getRootSourceDirectory() {
+    protected String getRootSourceDirectory() {
         if (isTestScope()) {
             return testSourceDirectory;
         }
         return sourceDirectory;
     }
 
-    protected File getStorySourceDirectory() {
-        return new File(getRootSourceDirectory(), storyDirectory);
-    }
-
     public static class InvalidClassNameException extends RuntimeException {
         public InvalidClassNameException(String message, Throwable cause) {
             super(message, cause);

Modified: trunk/plugins/maven/src/main/java/org/jbehave/mojo/StoryCodeGeneratorMojo.java (769 => 770)

--- trunk/plugins/maven/src/main/java/org/jbehave/mojo/StoryCodeGeneratorMojo.java	2007-07-15 23:20:23 UTC (rev 769)
+++ trunk/plugins/maven/src/main/java/org/jbehave/mojo/StoryCodeGeneratorMojo.java	2007-07-15 23:42:34 UTC (rev 770)
@@ -35,9 +35,8 @@
         }
     }
 
-    //TODO  make code generator configurable 
     private CodeGenerator createCodeGenerator() {
-        return new VelocityCodeGenerator(getStorySourceDirectory().getPath());
+        return new VelocityCodeGenerator(getRootSourceDirectory());
     }
 
     private void generateStoryCode(String storyPath) throws MalformedURLException {


To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email

Reply via email to