Essentially it's the IDE that supports TestNG or JUnit, not JBehave. If you want you can use Maven to run TestNG too, just use surefire/failsafe plugins, not the JBehave one.
On 26 Apr 2013, at 17:02, joao machado <joao_m_...@hotmail.com> wrote: > Hi all, > > I'm having some issues with TestNG and Maven. > I have the run() annotated with TestNG as the official documentation example. > When I run the story file with my IDEA everything works fine but when I run > with Maven the method annotated with @BeforeMethod doesn't get executed. > > Is missing something or can't I use TestNG specific annotations? > Should I use JBehave specific annotations in order to do "things" before each > story? > > Thanks in advance. > > From: joao_m_...@hotmail.com > To: dev@jbehave.codehaus.org > Date: Mon, 22 Apr 2013 22:43:06 +0000 > Subject: RE: [jbehave-dev] RE: Maven compile mixed Java 1.6 + Groovy 1.7 > project, using groovy-eclipse-compiler and TestNG > > F*ck YEAH, DONE ;-) > > Thanks for you prompt response. > > > Date: Tue, 23 Apr 2013 00:20:43 +0200 > From: mauro.tal...@aquilonia.org > To: dev@jbehave.codehaus.org > Subject: Re: [jbehave-dev] RE: Maven compile mixed Java 1.6 + Groovy 1.7 > project, using groovy-eclipse-compiler and TestNG > > Most likely a classloading issue with Groovy. Try adding groovy as a plugin > dependency > > <plugin> > <groupId>org.jbehave</groupId> > <artifactId>jbehave-maven-plugin</artifactId> > <executions> > .... > </executions> > <dependencies> > <dependency> > <groupId>org.codehaus.groovy</groupId> > <artifactId>groovy-all</artifactId> > <version>x.y.z</version> > </dependency> > </dependencies> > </plugin> > > On 22/04/2013 23:47, joao machado wrote: > > Hi people, > > I having some issues that I can't resolve without help. > > I'm trying to get one simple JBehave prototype running on my company's CI but > I can't run JBehave with maven plugin. > The codes compiles successfully and I'm able to run stories with IDEA. > > Can you guys help me try to understand what's going on? > > Thanks in advance, > > > [INFO] > ------------------------------------------------------------------------ > [INFO] BUILD FAILURE > [INFO] > ------------------------------------------------------------------------ > [INFO] Total time: 1:02.530s > [INFO] Finished at: Mon Apr 22 22:09:39 BST 2013 > [INFO] Final Memory: 26M/463M > [INFO] > ------------------------------------------------------------------------ > [ERROR] Failed to execute goal > org.jbehave:jbehave-maven-plugin:4.0-beta-3:run-s > tories-as-embeddables (embeddable-stories) on project > aus-sports-site-web-tests: > Execution embeddable-stories of goal > org.jbehave:jbehave-maven-plugin:4.0-beta- > 3:run-stories-as-embeddables failed: An API incompatibility was encountered > whil > e executing > org.jbehave:jbehave-maven-plugin:4.0-beta-3:run-stories-as-embeddabl > es: java.lang.NoSuchMethodError: > org.objectweb.asm.ClassWriter.<init>(I)V > [ERROR] ----------------------------------------------------- > [ERROR] realm = plugin>org.jbehave:jbehave-maven-plugin:4.0-beta-3 > [ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy > [ERROR] urls[0] = > file:/C:/.m2/org/jbehave/jbehave-maven-plugin/4.0-beta-3/jbeha > ve-maven-plugin-4.0-beta-3.jar > [ERROR] urls[1] = > file:/C:/.m2/org/jbehave/jbehave-core/4.0-beta-3/jbehave-core- > 4.0-beta-3.jar > [ERROR] urls[2] = file:/C:/.m2/junit/junit-dep/4.8.2/junit-dep-4.8.2.jar > [ERROR] urls[3] = > file:/C:/.m2/org/hamcrest/hamcrest-core/1.1/hamcrest-core-1.1. > jar > [ERROR] urls[4] = > file:/C:/.m2/org/hamcrest/hamcrest-library/1.1/hamcrest-librar > y-1.1.jar > [ERROR] urls[5] = > file:/C:/.m2/org/hamcrest/hamcrest-integration/1.1/hamcrest-in > tegration-1.1.jar > [ERROR] urls[6] = > file:/C:/.m2/commons-collections/commons-collections/3.2.1/com > mons-collections-3.2.1.jar > [ERROR] urls[7] = file:/C:/.m2/commons-io/commons-io/1.4/commons-io-1.4.jar > [ERROR] urls[8] = > file:/C:/.m2/commons-lang/commons-lang/2.5/commons-lang-2.5.ja > r > [ERROR] urls[9] = > file:/C:/.m2/org/codehaus/plexus/plexus-utils/2.0.5/plexus-uti > ls-2.0.5.jar > [ERROR] urls[10] = > file:/C:/.m2/org/freemarker/freemarker/2.3.16/freemarker-2.3. > 16.jar > [ERROR] urls[11] = > file:/C:/.m2/com/thoughtworks/paranamer/paranamer/2.4/paranam > er-2.4.jar > [ERROR] urls[12] = > file:/C:/.m2/com/thoughtworks/xstream/xstream/1.3.1/xstream-1 > .3.1.jar > [ERROR] urls[13] = file:/C:/.m2/xpp3/xpp3_min/1.1.4c/xpp3_min-1.1.4c.jar > [ERROR] urls[14] = > file:/C:/.m2/org/codehaus/plexus/plexus-interpolation/1.1/ple > xus-interpolation-1.1.jar > [ERROR] urls[15] = file:/C:/.m2/junit/junit/3.8.1/junit-3.8.1.jar > [ERROR] urls[16] = > file:/C:/.m2/org/codehaus/plexus/plexus-archiver/1.2/plexus-a > rchiver-1.2.jar > [ERROR] urls[17] = > file:/C:/.m2/org/codehaus/plexus/plexus-io/1.0.1/plexus-io-1. > 0.1.jar > [ERROR] urls[18] = > file:/C:/.m2/org/apache/maven/skins/maven-default-skin/1.0/ma > ven-default-skin-1.0.jar > [ERROR] Number of foreign imports: 1 > [ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]] > [ERROR] > [ERROR] ----------------------------------------------------- > [ERROR] -> [Help 1] > [ERROR] > [ERROR] To see the full stack trace of the errors, re-run Maven with the -e > swit > ch. > [ERROR] Re-run Maven using the -X switch to enable full debug logging. > [ERROR] > [ERROR] For more information about the errors and possible solutions, please > rea > d the following articles: > [ERROR] [Help 1] > http://cwiki.apache.org/confluence/display/MAVEN/PluginContaine > rException >