I've tried for days to use jboss-as-maven-plugin
to deploy web projects to remote JBoss AS7, but it didn't work.
Here is my pom.xml
:
<!-- JBoss Application Server -->
<plugin>
<groupId>org.jboss.as.plugins</groupId>
<artifactId>jboss-as-maven-plugin</artifactId>
<version>7.1.0.CR1b</version>
<executions>
<execution>
<phase>install</phase>
<goals>
<goal>deploy</goal>
</goals>
<!-- Only remote server needs -->
<configuration>
<hostname>192.168.1.104</hostname>
<port>9999</port>
<username>admin</username>
<password>admin123</password>
</configuration>
</execution>
</executions>
</plugin>
Using this configuration I can deploy to localhost without <configuration>
, even no <username>
and <password>
.
To deploy to my real IP address, I modified ${JBOSS_HOME}/configuration/standlone.xml, by changing jboss.bind.address
from 127.0.0.1 to 0.0.0.0 (to unbind JBoss address), so I can deploy projects by using:
<configuration>
<!-- 192.168.1.106 is my ip -->
<hostname>192.168.1.06</hostname>
<port>9999</port>
</configuration>
It works too, but by changing <hostname>
to point to my other computer (in the same router) it doesn't work but that computer receives a request, and the request is cut by something. (I thought it may be JBoss)
The error message in Maven console is as follows:
INFO: JBoss Remoting version 3.2.0.CR8
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 30.572s
[INFO] Finished at: Fri Feb 10 23:41:25 CST 2012
[INFO] Final Memory: 18M/170M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.jboss.as.plugins:jboss-as-maven-plugin:7.1.0.
CR1b:deploy (default) on project MessagePushX-RELEASE: Could not execute goal de
ploy on MessagePush.war. Reason: java.net.ConnectException: JBAS012144: Could no
t connect to remote://192.168.1.104:9999. The connection timed out -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Who can tell me is JBoss as 7.1.0 is not allowed remote deploy?
For some security issues?
It is definitely not a security issue.
The plugin you are referring uses the JBoss AS7 ability to deploy applications using the Server Deployment Manager (this is new feature in AS7). Previously the deployment was only possible via JMX console, which required the deployment artifact to be reachable by server (local file or URL).
You need to make sure:
what worked for me was to change from jboss-as plugin to wildfly plugin:
<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
<version>1.1.0.Alpha8</version>
</plugin>
and then using the maven command:
mvn wildfly:deploy
reference: https://issues.jboss.org/browse/WFLY-3684
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With