I'm using hudson-deploy plugin, to auto-deploy my .war
file to a remote jboss4.2.3.GA
.
When I set the port lower than 10000
, it works, for example:
http://10.78.68.210:8080/
But our system is using port 17200
, so the url should be
http://10.78.68.210:17200
this time, auto-deploy failed. the error message is:
Caused by: java.lang.IllegalArgumentException: port out of range:117200
at java.net.InetSocketAddress.<init>(InetSocketAddress.java:118)
at org.codehaus.cargo.container.jboss.JBoss4xRemoteDeployer.buildSocketAddressForDeployableServer(JBoss4xRemoteDeployer.java:269)
at org.codehaus.cargo.container.jboss.JBoss4xRemoteDeployer.<init>(JBoss4xRemoteDeployer.java:133)
at org.codehaus.cargo.container.jboss.JBoss4xRemoteDeployer.<init>(JBoss4xRemoteDeployer.java:117)
... 27 more
i saw a unexpected "117200" above, rather than "17200"
so i checked the source code:
String portStr = configuration.getPropertyValue(JBossPropertySet.REMOTEDEPLOY_PORT);
if (portStr == null)
{
portStr = "1" + configuration.getPropertyValue(ServletPropertySet.PORT);
}
and
String REMOTEDEPLOY_PORT = "cargo.jboss.remotedeploy.port";
since the virable portStr always returned null
, the portStr then be set to "1"+"17200", as a result "117200"
How can I let hudson-deploy load a valued cargo.jboss.remotedeploy.port
property? I tried everything but failed every time.
thanks a lot!