WAS v8.5 > Reference > Command-line utilities

Liberty profile: Maven goal - liberty:package-server

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

Usage:

This is the maven goal used to package a server.
mvn liberty:package-server -DserverHome=/path/to/server_home -DserverName=[worklightServer] 
-DpackageFile=/path/to/packaged_file

Example: packaging 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>package-server</id> <phase>post-integration-test</phase> <goals> <goal>package-server</goal> </goals> <configuration> <serverHome>${project.build.directory}/was4d</serverHome> servertest</serverName> <packageFile>/path/to/packaged_file</packageFile> </configuration> </execution> </executions> </plugin>


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


|