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.
一直在尝试使用我的seam项目和Jboss嵌入式容器进行集成测试但是没有取得多大成功。一直在做很多阅读,并一直在尝试这个JIRA中提到的但没有运气。
Amy currently just trying to get the 'testproject-master-JBSEAM-2371.zip' project working but am getting the following exception
Amy目前只是试图让'testproject-master-JBSEAM-2371.zip'项目正常运行但是我得到了以下异常
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)
Has oneone had any luck with getting the Seam integration tests working using maven and NOT a seam-gen project?
有没有人有幸使用maven而不是缝纫项目进行Seam集成测试?
1 个解决方案
#1
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插件进行切换,以便作为一个单独的进程部署到JBoss实例。不太理想但是我们的代码与Maven之间存在很多冲突。您是否需要嵌入式版本?
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.
你应该可以做这样的事情,在预集成测试阶段部署到JBoss,这样就可以运行集成测试。你仍然需要在maven之前启动jboss。不理想,但这对我有用。
<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>
#1
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插件进行切换,以便作为一个单独的进程部署到JBoss实例。不太理想但是我们的代码与Maven之间存在很多冲突。您是否需要嵌入式版本?
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.
你应该可以做这样的事情,在预集成测试阶段部署到JBoss,这样就可以运行集成测试。你仍然需要在maven之前启动jboss。不理想,但这对我有用。
<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>