有没有人成功运行过Jboss Embedded,Seam和Maven的集成测试? [英] Has anyone successfully run integration tests with Jboss embedded, Seam and Maven?

查看:111
本文介绍了有没有人成功运行过Jboss Embedded,Seam和Maven的集成测试?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一直在尝试对我的seam项目和Jboss嵌入式容器进行集成测试,但并没有取得太大的成功.进行了大量阅读,并尝试了此JIRA 中提到的内容但没有运气.

Have been trying to get integration testing working with my seam project and the Jboss embedded container but am not having much success. Have been doing a lot of reading and have been trying what is mentioned in this JIRA but am not having any luck.

艾米(Amy)目前正试图使'testproject-master-JBSEAM-2371.zip'项目正常运行,但出现了以下异常情况

Amy currently just trying to get the 'testproject-master-JBSEAM-2371.zip' project working but am getting the following exception

ERROR [org.jboss.embedded.DeploymentScanner] Failed to deploy
org.jboss.deployers.spi.DeploymentException: No deployer recognised the structure of vfsfile:/Users/aaron/Development/eclipse_workspaces/workspace_pink/testproject-web/target/test-classes/conf/jboss-service.xml
    at org.jboss.deployers.vfs.plugins.structure.VFSStructuralDeployersImpl.determineStructure(VFSStructuralDeployersImpl.java:219)
    at org.jboss.deployers.structure.spi.helpers.AbstractStructuralDeployers.determineStructure(AbstractStructuralDeployers.java:77)

有人通过maven而不是seam-gen项目获得Seam集成测试的运气吗?

Has oneone had any luck with getting the Seam integration tests working using maven and NOT a seam-gen project?

推荐答案

我放弃了嵌入式JBoss,并使用要部署到JBoss实例的Maven JBoss插件是作为一个单独的进程启动的.这并不理想,但是与我们的代码和Maven的解决方案存在许多冲突.您有需要嵌入式版本的理由吗?

I gave up on the embedded JBoss and switched with using the Maven JBoss Plugin to deploy to a JBoss instance started as a separate process. Not ideal but there were to many conflicts with our code and Maven to get around. Is there a reason you need the embedded version?

您应该能够在集成前测试阶段中执行类似的操作,以将其部署到JBoss,以便可以进行集成测试.您仍然必须在maven之前启动jboss.不理想,但这对我有用.

You should be able to do something like this to deploy to JBoss in the pre-integration test phase so the integration test could run against. You would still have to launch jboss before maven. Not ideal, but this is working for me.

       <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>jboss-maven-plugin</artifactId>
          <executions>
            <execution>
              <phase>pre-integration-test</phase>
              <goals>
                <goal>deploy</goal>
              </goals>
              <configuration>
                    <jbossHome>/opt/JBoss/current</jbossHome>
                    <port>8080</port>
              </configuration>
            </execution>
          </executions>
        </plugin>

这篇关于有没有人成功运行过Jboss Embedded,Seam和Maven的集成测试?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆