Unfortunately i think it's impossible. What I'll try to do is create a similar 
project. 

Here's the structure:

 site_modules_project:
 |--- src
            |--- test 
                     |----groovy
                                 |---- POs  (this POs can't be associated with 
another POs)

 web_test_bdd_project:
 |--- src
            |--- main
                     |----groovy
                                 |---- Another POs (this POs can't be 
associated with another POs)
                                 |---- Astraction layer of my company's testing 
framework
                     |---- java (BDD + Jbehave scope classes)

In JBehave scope classes I'm able to instantiate POs of any scope but I can't 
compose them. What I think is really strange is that I have others groovy 
objects that are being found correctly.

The pom plugins and properties listed below

  <properties>

        <jbehave.core.version>3.7.5</jbehave.core.version>
        <jbehave.web.version>3.5.4</jbehave.web.version>
        <jbehave.site.version>3.1.1</jbehave.site.version>

        <fluent.selenium.version>1.6.3</fluent.selenium.version>
        <selenium.version>2.32.0</selenium.version>
        <mock.version>1.1.0-SNAPSHOT</mock.version>
        <!-- jbehave props -->
        <stories>**/FeaturedModule.java</stories>
        <ignore.failures>true</ignore.failures>
        <threads>1</threads>
        <skip>false</skip>
        <meta.filter></meta.filter>
        <storyTimeoutInSecs>250</storyTimeoutInSecs>
        <java.version>1.6</java.version>
        <maven.compiler.version>2.4</maven.compiler.version>
        <maven.enforcer.version>1.0.1</maven.enforcer.version>
        <maven.gmaven.version>1.4</maven.gmaven.version>
        <groovy.version>1.8.6</groovy.version>
    </properties>

 <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>    
                <configuration>
                    <compilerId>groovy-eclipse-compiler</compilerId>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.codehaus.groovy</groupId>
                        <artifactId>groovy-eclipse-compiler</artifactId>
                        <version>2.7.0-01</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-dependencies</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            
<outputDirectory>${project.build.directory}/lib</outputDirectory>
                            <overWriteReleases>false</overWriteReleases>
                            <overWriteSnapshots>false</overWriteSnapshots>
                            <overWriteIfNewer>true</overWriteIfNewer>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
                    <plugin>
                        <groupId>org.jbehave</groupId>
                        <artifactId>jbehave-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>unpack-view-resources</id>
                                <phase>process-resources</phase>
                                <goals>
                                    <goal>unpack-view-resources</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>embeddable-stories</id>
                                <phase>test</phase>
                                <configuration>
                                    <includes>
                                        <include>${stories}</include>
                                    </includes>
                                    <excludes />
                                    
<ignoreFailureInStories>${ignore.failures}</ignoreFailureInStories>
                                    
<ignoreFailureInView>${ignore.failures}</ignoreFailureInView>
                                    <threads>${threads}</threads>
                                    <skip>${skip}</skip>
                                    
<storyTimeoutInSecs>${storyTimeoutInSecs}</storyTimeoutInSecs>
                                    <metaFilters>
                                        <metaFilter>${meta.filter}</metaFilter>
                                    </metaFilters>
                                </configuration>
                                <goals>
                                    <goal>run-stories-as-embeddables</goal>
                                </goals>
                            </execution>
                        </executions>
                        <dependencies>
                            <dependency>
                                <groupId>org.codehaus.groovy</groupId>
                                <artifactId>groovy-all</artifactId>
                                <version>${groovy.version}</version>
                            </dependency>
                            <dependency>
                                <groupId>log4j</groupId>
                                <artifactId>log4j</artifactId>
                                <version>1.2.16</version>
                            </dependency>
                        </dependencies>
                    </plugin>
        </plugins>
    </build>


Thanks in advance
                                
From: mauro.tal...@aquilonia.org
Date: Tue, 30 Apr 2013 09:35:55 +0100
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

Are you able to send a sample project reproducing the behaviour?


On 30 Apr 2013, at 00:05, joao machado <joao_m_...@hotmail.com> wrote:







Hi all,

another runtime issue, but now JBehave a throwing ClassNotFoundException and I 
have 100% sure that the class is in classpath. 
I have an pageObejctX composing an pageObjectY , both in Groovy, and I'm using 
that pageObjectX in my Java step class but "ClassNotFoundException: 
pageObjectY" is thrown when instantiating pageObjectX. Before instantiating 
pageObejctX I tried to instantiate pageObjectY in the step class and it working 
fine.

Does anyone had this problem or have any sugestion?

Thanks in advance.

From: joao_m_...@hotmail.com
To: dev@jbehave.codehaus.org
Date: Fri, 26 Apr 2013 21:36:42 +0000
Subject: RE: [jbehave-dev] RE: Maven compile mixed Java 1.6 + Groovy 1.7 
project, using groovy-eclipse-compiler and TestNG




Thank you guys.

Cheers.

From: mauro.tal...@aquilonia.org
Date: Fri, 26 Apr 2013 17:16:26 +0100
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

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

          
        
      
    
    
                                                                                
                                          
                                          
                                          

                                          

Reply via email to