[ 
http://jira.codehaus.org/browse/JBEHAVE-207?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=220570#action_220570
 ] 

Bogdan Prishedko commented on JBEHAVE-207:
------------------------------------------

This issue reproduces stable if we have <configuration> section is placed only 
under <execution> section, as in \examples\gameoflife\pom.xml:

      <plugin>
        <groupId>org.jbehave</groupId>
        <artifactId>jbehave-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>run-scenarios-found</id>
            <phase>integration-test</phase>
            <configuration>
              <scenarioIncludes>
                <scenarioInclude>${scenario.includes}</scenarioInclude>
              </scenarioIncludes>
              <scenarioExcludes>
                <scenarioExclude>**/*Steps.java</scenarioExclude>
              </scenarioExcludes>
              <classLoaderInjected>false</classLoaderInjected>
            </configuration>
            <goals>
              <goal>run-scenarios</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

In this case Maven doesn't injects configuration parameters (see including and 
excluding below):

[INFO] [jbehave:run-scenarios {execution: default-cli}]
[DEBUG] Searching for scenario class names including null and excluding null
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Invalid scenario class path .svn\all-wcprops
[INFO] ------------------------------------------------------------------------
[DEBUG] Trace
org.jbehave.scenario.errors.InvalidScenarioClassPathException: Invalid scenario 
class path .svn\all-wcprops
        at 
org.jbehave.scenario.parser.ScenarioClassNameFinder.classNameFor(ScenarioClassNameFinder.java:53)
        at 
org.jbehave.scenario.parser.ScenarioClassNameFinder.listScenarioClassNames(ScenarioClassNameFinder.java:41)

And it can be fixed by moving <configuration> from <execution> to <plugin> tag:

      <plugin>
        <groupId>org.jbehave</groupId>
        <artifactId>jbehave-maven-plugin</artifactId>
          <configuration>
            <scenarioIncludes>
              <scenarioInclude>${scenario.includes}</scenarioInclude>
            </scenarioIncludes>
            <scenarioExcludes>
              <scenarioExclude>**/*Steps.java</scenarioExclude>
            </scenarioExcludes>
            <classLoaderInjected>false</classLoaderInjected>
          </configuration>          
        <executions>
          <execution>
            <id>run-scenarios-found</id>
            <phase>integration-test</phase>
            <goals>
              <goal>run-scenarios</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

After this result of execution is the following:

[DEBUG] Searching for scenario class names including [**/scenario/*.java] and 
excluding [**/*Steps.java]
[DEBUG] Found scenario class names: []
[INFO] No scenarios to run.
[INFO] 
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] ------------------------------------------------------------------------
[INFO] JBehave Examples ...................................... SUCCESS [1.592s]
[INFO] JBehave Game of Life Example .......................... SUCCESS [0.015s]
[INFO] JBehave Game of Life Example Scenarios ................ SUCCESS [0.010s]
[INFO] JBehave Trader Example ................................ SUCCESS [0.031s]
[INFO] JBehave Trader Test Scope Example ..................... SUCCESS [0.004s]
[INFO] JBehave Noughts And Crosses Example ................... SUCCESS [0.011s]
[INFO] JBehave Noughts And Crosses Example Scenarios ......... SUCCESS [0.014s]
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL


> Exclude SCM patterns from ScenarioClassNameFinder
> -------------------------------------------------
>
>                 Key: JBEHAVE-207
>                 URL: http://jira.codehaus.org/browse/JBEHAVE-207
>             Project: JBehave
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 2.3
>            Reporter: Mauro Talevi
>            Priority: Minor
>
> Automatically exclude .svn and other SCM directories from the directory scan.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to