The undeploy
task supports undeployment of one or more applications from the WebSphere Liberty server.
undeploy
depends on libertyStart
for a running server.
See the Liberty server configuration properties for common server configuration.
The undeploy
task uses an undeploy
block within the server
block to define task specific behavior.
Attribute | Type | Since | Description | Required |
---|---|---|---|---|
apps | Object[] | 3.0 | Specifies which tasks/files should be undeployed from the apps directory. Applications can be passed in as the task that generates the file or as an application file. |
Yes - if dropins is not specified. |
dropins | Object[] | 3.0 | Specifies which tasks/files should be undeployed from the dropins directory. Applications can be passed in as the task that generates the file or as an application file. |
Yes - if apps is not specified. |
- Undeploys a single application file.
apply plugin: 'liberty'
liberty {
server {
name = 'myServer'
undeploy {
apps = [file('app.war')]
}
}
}
- Undeploy multiple applications. Specifically, undeploy
sample.war
and the application generated by thewar
task fromapps
, andtest-war.war
fromdropins
.
apply plugin: 'liberty'
apply plugin: 'war'
liberty {
server {
name = 'myServer'
undeploy {
apps = [war, file('sample.war')]
dropins = [file('test-war.war')]
}
}
}
If no property is set for the undeploy
block, nothing will be undeployed. A value must be provided to undeploy an application.