JBoss Community

Deploying an application from an external deployment location

new comment by Brian Stansberry View all comments on this document

You can do it via a low-level CLI command (i.e. not using the standard high level CLI 'deploy' command.)

 

The syntax is a bit tricky, so pay attention to the [] and {}:

 

[standalone@localhost:9999 /] /deployment=helloworld.war:add(content=[{url=file:///home/bstansberry/tmp/helloworld.war}],enabled=true)

{"outcome" => "success"}

 

In the example above I used a file URL, which is kind of silly, but it's just an example. The value for the 'url' param can be any string "urlSpec" where, inside the server, the following call would work:

 

InputStream in = new URL(urlSpec).openStream();

 

For example, using HTTP:

 

[standalone@localhost:9999 /] /deployment=helloworld.war:add(content=[{url=http://myserver.com/deployments/helloworld.war}],enabled=true)