WAS v8.5 > Reference > Command-line utilities

Liberty profile: Maven goal - liberty:deploy

If we install the Maven plug-in, we can use the liberty:deploy goal to install applications on a Liberty profile server.

Usage:

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

Example: deploying 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>deployapp</id> <phase>pre-integration-test</phase> <goals> <goal>deploy</goal> </goals> <configuration> <appArchive>SimpleOSGiApp.eba</appArchive> </configuration> </execution> </executions> </plugin>


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


|