WAS v8.5 > Reference > Command-line utilities

Liberty profile: Maven goal - liberty:undeploy

If we install the Maven plug-in, we can use the liberty:undeploy goal to remove an application from the Liberty profile server.

Usage:

This is the maven goal used to remove an application from the server.
mvn liberty:undeploy -DserverHome=/path/to/server_home 
                     -DserverName=[worklightServer] -DappArchive=/appname

Example: Undeploying an application.

This is the code snippet that we can use in the pom.xml file of your project.

    <plugin> <groupId>com.ibm.websphere.wlp.maven.plugins</groupId> <artifactId>liberty-maven-plugin</artifactId> <version>1.0</version> <executions> <execution> <id>undeploy</id> <goals> <goal>undeploy</goal> </goals> <configuration> <appArchive>foo.ear</appArchive> </configuration> </execution> </executions> </plugin>


Parent topic: Use Maven to automate tasks for the Liberty profile


|