在使用 maven 进行功能测试之前部署 jBoss 7


我想

在巡航控制上运行功能测试之前,将我的耳朵和maven部署到已安装的jBoss 7上。

功能测试在另一个模块中。

在执行测试模块之前,从 maven 部署 jBoss 服务器的最佳方法是什么?

编辑:

我找到了以下内容,但它不起作用:

        <plugin>
            <groupId>org.jboss.as.plugins</groupId>
            <artifactId>jboss-as-maven-plugin</artifactId>
            <version>7.1.1.Final</version>
            <executions>
                <execution>
                    <id>jboss-undeploy</id>
                    <goals>
                        <goal>undeploy</goal>
                    </goals>
                    <phase>clean</phase>
                </execution>
                <execution>
                    <id>jboss-deploy</id>
                    <goals>
                        <goal>deploy</goal>
                    </goals>
                    <phase>package</phase>
                </execution>
            </executions>
            <configuration>
                <jbossHome>${jboss.directory}</jbossHome>
                <serverName>default</serverName>
                <hostName>localhost</hostName>
                <port>8099</port>
                <fileNames>
                    <fileName>${basedir}targetecad-application-ws-ear-1.0.0-SNAPSHOT.ear</fileName>
                </fileNames>
            </configuration>
        </plugin>

我得到 :

[ERROR] Failed to execute goal org.jboss.as.plugins:jboss-as-maven- plugin:7.1.1.Final:deploy (jboss-deploy) on project ecad-application-ws-ear:   Error executing FORCE_DEPLOY: Could not execute operation '{
[ERROR] "operation" => "read-children-names",
[ERROR] "child-type" => "deployment"
[ERROR] }': java.net.ConnectException: JBAS012144: Could not connect to remote://localhost:8099. The connection timed out
[ERROR] -> [Help 1]

但我没有在任何地方指定 remote://?

在命令行中尝试一下。

mvn deploy -DskipTests

-DskipTests 指令将 maven 配置为跳过测试。

最新更新