或者jbossHome' null'必须存在

时间:2015-11-10 13:33:26

标签: jboss-arquillian

我正在

org.jboss.arquillian.container.spi.ConfigurationException: jbossHome 'null' must exist

当我尝试从maven运行我的Arquillian测试时。我该怎么办?

2 个答案:

答案 0 :(得分:4)

您还可以尝试在arquillian.xml中指向必需的属性。 例如在我的arquillian.xml中:

<?xml version="1.0" encoding="UTF-8"?>
<arquillian xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xmlns="http://jboss.org/schema/arquillian"
   xsi:schemaLocation="http://jboss.org/schema/arquillian
        http://jboss.org/schema/arquillian/arquillian_1_0.xsd">

   <defaultProtocol type="Servlet 3.0" />

   <container qualifier="jboss" default="true">
       <configuration>
           <property name="jbossHome">c:\dev\jboss-eap-6.3\</property>
           <property name="serverConfig">standalone-test.xml</property>
           <property name="javaVmArguments">-Xrunjdwp:transport=dt_socket,address=5505,server=y,suspend=n -Xmx1024m -XX:MaxPermSize=256m</property>
       </configuration>
   </container>
</arquillian>

答案 1 :(得分:0)

在运行集成测试之前,需要设置指向Jboss / EAP服务器的JBOSS_HOME环境变量。您可以从命令行执行此操作:

set JBOSS_HOME=c:\jboss-eap-6.4 (on Windows)
export JBOSS_HOME=/home/jboss-eap-6.4 (on Linux)

或在pom.xml文件中设置:

<build><plugins><plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-failsafe-plugin</artifactId>
    <executions>
        <execution>
            <goals>
                <goal>integration-test</goal>
                <goal>verify</goal>
            </goals>
            <configuration>
                <environmentVariables>
                    <JBOSS_HOME>c:\jboss-eap-6.4</JBOSS_HOME>
                </environmentVariables>
            </configuration>
        </execution>
    </executions>
</plugin></plugins></build>