1 Reply Latest reply on Dec 10, 2008 9:51 AM by Siarhei Dudzin

    Missing dependency in Seam Documentation test chapter

    Riccardo Serafin Newbie

      Hello,


      I'm writing 'cos I've been having some problems in setting up a maven project able to correctly run tests using the SeamTest.


      I've added all the dependencies listed in Chapter 35 of the Seam Guide, but i was always getting a problem with the embedded jboss not being able to deploy the ejb3-interceptors-aop.xml. To solve the problem I had to add the javassist lib to the dependency list. Is this normal? Is this lib really required? If so, maybe it should be added in the documentation.


      Moreover, so far I've not found a better way to have the bootstrap directory on the class path than to unzip it from the jboss-embedded bin zip and put it in my target directory. I'm wondering if there is a better way to do that.


      Thanks for any help,
      Riccardo.


      PS:


      This is my current list of dependencies:



      <!-- Seam dependency -->
                <dependency>
                     <groupId>org.jboss.seam</groupId>
                     <artifactId>jboss-seam</artifactId>
                     <version>2.1.0.GA</version>
                     <scope>provided</scope>
                </dependency>
                
                <dependency>
                     <groupId>javax.faces</groupId>
                     <artifactId>jsf-api</artifactId>
                     <version>1.2_08</version>
                     <scope>provided</scope>
                </dependency>
                
                <dependency>
                     <groupId>javax.faces</groupId>
                     <artifactId>jsf-impl</artifactId>
                     <version>1.2_08</version>
                     <scope>provided</scope>
                </dependency>
                
                <dependency>
                     <groupId>com.sun.facelets</groupId>
                     <artifactId>jsf-facelets</artifactId>
                     <version>1.1.14</version>
                     <scope>runtime</scope>
                </dependency>
      
      <!-- Jboss embedded dependencies to run seam tests. -->
                <dependency>
                     <groupId>org.jboss.seam.embedded</groupId>
                     <artifactId>hibernate-all</artifactId>
                     <version>beta3.SP4</version>
                     <scope>test</scope>
                </dependency>
                
                <dependency>
                     <groupId>org.jboss.seam.embedded</groupId>
                     <artifactId>jboss-embedded-all</artifactId>
                     <version>beta3.SP4</version>
                     <scope>test</scope>
                </dependency>
                
                <dependency>
                     <groupId>org.jboss.seam.embedded</groupId>
                     <artifactId>thirdparty-all</artifactId>
                     <version>beta3.SP4</version>
                     <scope>test</scope>
                </dependency>
                
                <dependency>
                     <groupId>org.jboss.seam.embedded</groupId>
                     <artifactId>jboss-embedded-api</artifactId>
                     <version>beta3.SP4</version>
                     <scope>test</scope>
                </dependency>
                
                <dependency>
                     <groupId>org.jboss.el</groupId>
                     <artifactId>jboss-el</artifactId>
                     <version>2.0.2.CR1</version>
                     <scope>test</scope>
                </dependency>
                
                <dependency>
                     <groupId>javax.el</groupId>
                     <artifactId>el-api</artifactId>
                     <version>1.2</version>
                     <scope>test</scope>
                </dependency>
                
                <dependency>
                     <groupId>javax.activation</groupId>
                     <artifactId>activation</artifactId>
                     <version>1.1</version>
                     <scope>test</scope>
                </dependency>
                
                <dependency>
                     <!-- Needed to have jboss embedded pick up the ejb aop  -->
                     <groupId>javassist</groupId>
                       <artifactId>javassist</artifactId>
                       <version>3.9.0.GA</version>
                     <scope>test</scope>
                </dependency> 



      And this is the custom goal I use to unpack the bootstrap dir:


      <plugin>
                          <artifactId>maven-dependency-plugin</artifactId>
                          <executions>
                               <!-- Download JBossEmbedded and unpack it to target directory -->
                               <execution>
                                    <id>download-embedded-jboss-bootstrap</id>
                                    <phase>process-test-resources</phase>
                                    <goals>
                                         <goal>unpack</goal>
                                    </goals>
                                    <configuration>
                                         <artifactItems>
                                              <artifactItem>
                                                   <groupId>org.jboss.embedded</groupId>
                                                   <artifactId>jboss-embedded</artifactId>
                                                   <type>zip</type>
                                                   <version>beta3.SP4</version>
                                                   <classifier>bin</classifier>
                                                   <includes>**/bootstrap/**/*</includes>
                                              </artifactItem>
                                         </artifactItems>
                                         <outputDirectory>${project.build.directory}</outputDirectory>
                                    </configuration>
                               </execution>
                          </executions>
                     </plugin>




      which is the put in classpath by:



      <plugin>
                          <groupId>org.apache.maven.plugins</groupId>
                          <artifactId>maven-surefire-plugin</artifactId>
                          <version>2.4.2</version>
                          <configuration>
                               <suiteXmlFiles>
                                    <suiteXmlFile>...</suiteXmlFile>
                               </suiteXmlFiles>
                               <additionalClasspathElements>
                                    <additionalClasspathElement>${project.build.directory}/embedded-jboss-beta3.SP4/bootstrap</additionalClasspathElement>
                               </additionalClasspathElements>
                               <childDelegation>true</childDelegation>
                               <useSystemClassLoader>true</useSystemClassLoader>
                               <forkMode>once</forkMode>
                               <reportFormat>plain</reportFormat>
                               <testFailureIgnore>false</testFailureIgnore>
                          </configuration>
                     </plugin>