WAS v8.5 > Reference > Command-line utilitiesLiberty profile: Maven goal - liberty:stop-server
If we install the Maven plug-in, we can use the liberty:stop-server goal to stop a Liberty profile server.
- Usage:
- This is the maven goal used to stop a running server.
mvn liberty:stop-server -DserverHome=/path/to/server_home -DserverName=[worklightServer]
- Example: Stopping a server
- 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>stop-server</id> <phase>post-integration-test</phase> <goals> <goal>stop-server</goal> </goals> <configuration> <serverHome>${project.build.directory}/wlp</serverHome> servertest</serverName> </configuration> </execution> </executions> </plugin>
Parent topic: Use Maven to automate tasks for the Liberty profile
|