JBehave
  1. JBehave
  2. JBEHAVE-514

jbehave-maven-plugin ignoring execution

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Critical Critical
    • Resolution: Not A Bug
    • Affects Version/s: 3.3.2
    • Fix Version/s: 3.4.3, 3.5
    • Component/s: Maven Plugin
    • Labels:
      None
    • Environment:
    • Number of attachments :
      0

      Description

      when trying to execute a package on a maven project with jbehave and jbehave-maven-plugin configured Maven fails to execute the jbehave goal. This is regardless of weather I execute it with in Eclipse or on the commandline.

      However if I issue the following command on the command line the jbehave-maven-plugin is executed and runs the acceptance tests:
      mvn clean package org.jbehave:jbehave-maven-plugin:3.3.2:run-stories-as-embeddables

      The command I use in Eclipse is:
      jbehave:run-stories-as-embeddables

      I have configured the jbehave plugin:

      	<plugins>
      		<plugin>
      			<groupId>org.apache.maven.plugins</groupId>
      			<artifactId>maven-compiler-plugin</artifactId>
      			<configuration>
      				<source>1.6</source>
      				<target>1.6</target>
      			</configuration>
      		</plugin>
      
      		<plugin>
      			<groupId>org.jbehave</groupId>
      			<artifactId>jbehave-maven-plugin</artifactId>
      			<version>3.3.2</version>
      
      			<configuration>
      				<scope>test</scope>
      				<includes>
      					<include>**/*.java</include>
      				</includes>
      
      				<metaFilters>
      					<metaFilter>+author *</metaFilter>
      					<metaFilter>-skip</metaFilter>
      				</metaFilters>
      				<systemProperties>
      					<property>
      						<name>java.awt.headless</name>
      						<value>true</value>
      					</property>
      				</systemProperties>
      				<ignoreFailureInStories>true</ignoreFailureInStories>
      				<ignoreFailureInView>false</ignoreFailureInView>
      			</configuration>
      
      			<executions>
      				<execution>
      					<id>run-stories-as-embeddables</id>
      					<phase>test</phase>
      					<goals>
      						<goal>run-stories-as-embeddables</goal>
      					</goals>
      
      				</execution>
      			</executions>
      		</plugin>
      	</plugins>
      

      Thanks
      Gavin

        Activity

        Hide
        Mauro Talevi added a comment -

        Have you tried executing:

        mvn clean install
        

        The Maven goal is bound by default to the integration-test phase, so you don't need to specify the goal.

        Show
        Mauro Talevi added a comment - Have you tried executing: mvn clean install The Maven goal is bound by default to the integration-test phase, so you don't need to specify the goal.
        Hide
        Mauro Talevi added a comment -

        To run in Eclipse, install http://m2eclipse.sonatype.org/ and execute 'Run As' ... 'Maven install'

        Show
        Mauro Talevi added a comment - To run in Eclipse, install http://m2eclipse.sonatype.org/ and execute 'Run As' ... 'Maven install'
        Hide
        Gavin Tranter added a comment -

        Hi,
        Thank you for your prompt reply.
        I have both tried mvn clean install and already have m2e installed.
        I have included the out put from Run as ... Maven Install from eclipse:

        [INFO] Scanning for projects...
        [INFO]
        [INFO] ------------------------------------------------------------------------
        [INFO] Building Portal Acceptance Tests 0.0.1-SNAPSHOT
        [INFO] ------------------------------------------------------------------------
        [INFO]
        [INFO] — maven-resources-plugin:2.4.1:resources (default-resources) @ portal-acceptance —
        [INFO] Using 'UTF-8' encoding to copy filtered resources.
        [INFO] Copying 1 resource
        [INFO]
        [INFO] — maven-compiler-plugin:2.0.2:compile (default-compile) @ portal-acceptance —
        [INFO] Nothing to compile - all classes are up to date
        [INFO]
        [INFO] — maven-resources-plugin:2.4.1:testResources (default-testResources) @ portal-acceptance —
        [INFO] Using 'UTF-8' encoding to copy filtered resources.
        [INFO] Copying 0 resource
        [INFO]
        [INFO] — maven-compiler-plugin:2.0.2:testCompile (default-testCompile) @ portal-acceptance —
        [INFO] Nothing to compile - all classes are up to date
        [INFO]
        [INFO] — maven-surefire-plugin:2.8.1:test (default-test) @ portal-acceptance —
        [INFO] Surefire report directory: /home/gavintranter/Documents/blue/PortalAcceptance/target/surefire-reports
        [INFO]
        [INFO] — maven-jar-plugin:2.2:jar (default-jar) @ portal-acceptance —
        [INFO]
        [INFO] — maven-install-plugin:2.3:install (default-install) @ portal-acceptance —
        [INFO] Skipped re-installing /home/gavintranter/Documents/blue/PortalAcceptance/target/portal-acceptance-0.0.1-SNAPSHOT.jar to /home/gavintranter/.m2/repository/xxx/xxxxxxxx/portal-acceptance/0.0.1-SNAPSHOT/portal-acceptance-0.0.1-SNAPSHOT.jar, seems unchanged
        [INFO] ------------------------------------------------------------------------
        [INFO] BUILD SUCCESS
        [INFO] ------------------------------------------------------------------------
        [INFO] Total time: 1.951s
        [INFO] Finished at: Fri May 13 15:43:49 BST 2011
        [INFO] Final Memory: 7M/164M
        [INFO] ------------------------------------------------------------------------

        Show
        Gavin Tranter added a comment - Hi, Thank you for your prompt reply. I have both tried mvn clean install and already have m2e installed. I have included the out put from Run as ... Maven Install from eclipse: [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building Portal Acceptance Tests 0.0.1-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] — maven-resources-plugin:2.4.1:resources (default-resources) @ portal-acceptance — [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 1 resource [INFO] [INFO] — maven-compiler-plugin:2.0.2:compile (default-compile) @ portal-acceptance — [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] — maven-resources-plugin:2.4.1:testResources (default-testResources) @ portal-acceptance — [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 0 resource [INFO] [INFO] — maven-compiler-plugin:2.0.2:testCompile (default-testCompile) @ portal-acceptance — [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] — maven-surefire-plugin:2.8.1:test (default-test) @ portal-acceptance — [INFO] Surefire report directory: /home/gavintranter/Documents/blue/PortalAcceptance/target/surefire-reports [INFO] [INFO] — maven-jar-plugin:2.2:jar (default-jar) @ portal-acceptance — [INFO] [INFO] — maven-install-plugin:2.3:install (default-install) @ portal-acceptance — [INFO] Skipped re-installing /home/gavintranter/Documents/blue/PortalAcceptance/target/portal-acceptance-0.0.1-SNAPSHOT.jar to /home/gavintranter/.m2/repository/xxx/xxxxxxxx/portal-acceptance/0.0.1-SNAPSHOT/portal-acceptance-0.0.1-SNAPSHOT.jar, seems unchanged [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.951s [INFO] Finished at: Fri May 13 15:43:49 BST 2011 [INFO] Final Memory: 7M/164M [INFO] ------------------------------------------------------------------------
        Hide
        Mauro Talevi added a comment -

        Difficult to help you without seeing your full project. You could either upload the simplified project (simplest possible the reproduces the problem) or you could generate a working project using an archetype - a new feature of 3.4 (see http://jbehave.org/reference/preview/archetypes.html).

        Show
        Mauro Talevi added a comment - Difficult to help you without seeing your full project. You could either upload the simplified project (simplest possible the reproduces the problem) or you could generate a working project using an archetype - a new feature of 3.4 (see http://jbehave.org/reference/preview/archetypes.html ).
        Hide
        Gavin Tranter added a comment -

        Hi Mauro,
        I seem to have gotten this to work properly now.
        The error was, was as usual user error, or rather lack of understanding on my part.

        I had added the following to the pom from the example:

        <metaFilters>
            <metaFilter>+author *</metaFilter>
            <metaFilter>-skip</metaFilter>
        </metaFilters>
        

        I am still not sure what the meaning of these are, so have removed them and my build runs correctly.

        Thank you for your help in this.

        Gavin

        Show
        Gavin Tranter added a comment - Hi Mauro, I seem to have gotten this to work properly now. The error was, was as usual user error, or rather lack of understanding on my part. I had added the following to the pom from the example: <metaFilters> <metaFilter>+author *</metaFilter> <metaFilter>-skip</metaFilter> </metaFilters> I am still not sure what the meaning of these are, so have removed them and my build runs correctly. Thank you for your help in this. Gavin
        Mauro Talevi made changes -
        Field Original Value New Value
        Fix Version/s 3.4.3 [ 17400 ]
        Fix Version/s 3.x [ 16979 ]
        Affects Version/s 3.3.2 [ 17308 ]
        Affects Version/s web-3.3.2 [ 17361 ]
        Hide
        Mauro Talevi added a comment -
        Show
        Mauro Talevi added a comment - Meta filters are documented here: http://jbehave.org/reference/stable/meta-filtering.html
        Mauro Talevi made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Not A Bug [ 6 ]
        Mauro Talevi made changes -
        Fix Version/s 3.5 [ 17393 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Gavin Tranter
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: