使用 Maven 插件在 Jboss EAP 6.4 上部署时连接超时

Connection timed out when deploying on Jboss EAP 6.4 using maven plugin

我正在使用 Jboss EAP 6.4,我想使用 maven jboss 插件部署到 Jboss。
但是我收到了这个错误

Failed to execute goal org.jboss.as.plugins:jboss-as-maven-plugin:7.6.Final:undeploy (default-cli) on project MyProject: Could not execute goal undeploy on E:\Work\trunk\MyProject\target\MyProject.war. 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

这是我的配置

<plugin>
    <groupId>org.jboss.as.plugins</groupId>
    <artifactId>jboss-as-maven-plugin</artifactId>

    <configuration>
            <force>true</force>
            <hostname>127.0.0.1/hostname>
            <username>admin</username>
            <password>admin</password>
            <port>9990</port>
            <fileNames>
                <fileName>target/MyProject.war</fileName>
            </fileNames>
    </configuration>
</plugin>

我能够使用密码 admin 和 admin (http://127.0.0.1:9990/console)

登录管理员 jboss 控制台

在 JBoss EAP 6.4 上,默认本机管理端口是 9999。 Web 控制台使用端口 9990,因为这是 http 管理端口。

也没有 fileNames 配置 属性。除了 usernamepassword 之外的其他属性都使用默认值,因此不需要它们。

如果您要部署到本地主机,通常也不需要 usernamepassword。客户端应在本地进行身份验证。当然,这取决于服务器的配置方式。