jBoss as maven plugin - 无法连接到localhost:9990

时间:2015-04-10 10:55:34

标签: java maven jboss

我正在尝试部署到我的jBoss as7但是jboss-as-maven-plugin似乎无法连接到服务器。

始终显示此错误:

[ERROR] Failed to execute goal org.jboss.as.plugins:jboss-as-maven-plugin:7.6.Final:deploy (deploy-to-server) on project ecad-application-ws-ear: Could not execute goal deploy on  C:\JavaDevelopment\WorkSpaces\ecad2\ecad2\application\ws\ear\target\ecad-application-ws-ear-1.0.0-SNAPSHOT.ear. Reason: I/O Error could not execute operation '{
[ERROR] "operation" => "read-attribute",
[ERROR] "address" => [],
[ERROR] "name" => "launch-type"
[ERROR] }': java.net.ConnectException: JBAS012144: Could not connect to  remote://127.0.0.1:9990. The connection timed out

我已经阅读并尝试过: JBoss AS 7 auto deploy plugin cannot connect to localhost:8080 但没有成功..

这是我的插件配置:

<plugin>
            <groupId>org.jboss.as.plugins</groupId>
            <artifactId>jboss-as-maven-plugin</artifactId>
            <version>7.6.Final</version>
            <executions>
               <execution>
                    <id>deploy-to-server</id>
                    <phase>pre-integration-test</phase>
                    <goals>
                        <goal>deploy</goal>
                    </goals>
                    <configuration>
                        <port>9990</port>
                        <username>admin</username>
                        <password>admin1</password>
                        <hostname>127.0.0.1</hostname>
                    </configuration>
                </execution>  
            </executions>
        </plugin> 

知道管理端口已更改为9990,我可以手动连接到: localhost:9990,用户名为admin,并传递admin1 ..

1 个答案:

答案 0 :(得分:0)

我正在使用WildFly。它正在为我工​​作。

<plugin>
    <groupId>org.wildfly.plugins</groupId>
        <artifactId>wildfly-maven-plugin</artifactId>
        <version>1.0.0.Final</version>
            <configuration>
                    <hostname>${wildfly-hostname}</hostname>
                    <port>${wildfly-port}</port>
                    <username>${wildfly-username}</username>
                    <password>${wildfly-password}</password>
                </configuration>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>deploy</goal>
                        </goals>
                    </execution>
             </executions>
        </plugin>