Liberty profile: Maven goal - liberty:install-apps

You can use the liberty:install-apps goal to copy one or more applications to a Liberty profile server.

The liberty:install-apps goal copies applications specified as Maven dependencies to the dropins/ directory of the Liberty profile server. Only the Maven dependencies in compile scope are copied to the server. The server must exist and must not be running. The liberty:install-apps goal can be combined with the liberty:package-server goal to create a Liberty profile server archive with pre-installed applications.

Parameters

The following table describes parameters of the install-apps goal.

Table 1. The parameters of the install-apps goal.

The first column contains a list of parameters, the second column contains a description of each parameter, and the third column states whether this parameter is required.

Parameter Description Required
serverHome Directory location of the Liberty profile server installation. Yes, only when assemblyArchive and assemblyArtifact parameters are not set.
assemblyArchive Location of the Liberty profile server compressed archive. The archive will be unpacked into a directory as specified by the installDirectory parameter. Yes, only when serverHome and assemblyArtifact parameters are not set.
assemblyArtifact Maven artifact name of the Liberty profile server assembly. The assembly will be installed into a directory as specified by the installDirectory parameter. For more information on Liberty profile server Maven assemblies, see Liberty profile: Installation as a Maven artifact. Yes, only when serverHome and assemblyArchive parameters are not set.
installDirectory Local installation directory location of the Liberty profile server when the server is installed using the assembly archive or artifact option. The default value is ${project.build.directory} /liberty. No
refresh If true, re-install Liberty profile server into the local directory. This is only used when when the server is installed using the assembly archive or artifact option. The default value is false. No
serverName Name of the Liberty profile server instance. The default value is defaultServer. No
Example: installing application
This is the code snippet that you can use in the pom.xml file of your project.
<build>
    ...
    <dependencies>
        <!-- Application to install and package -->
        <dependency>
            <groupId>wasdev</groupId>
            <artifactId>SimpleServlet</artifactId>
            <version>1.0</version>
            <type>war</type>
        </dependency>
    </dependencies>
    ...
    <plugins>
        <plugin>
            <groupId>com.ibm.websphere.wlp.maven.plugins</groupId>
            <artifactId>liberty-maven-plugin</artifactId> 
            <version>1.0</version>
            <executions>
                ...
                <execution>
                    <id>install-apps</id>
                    <phase>compile</phase>
                    <goals>
                        <goal>install-apps</goal>
                    </goals>
                </execution>
                ...
            <executions>
            <configuration>
                <serverHome>/opt/ibm/wlp</serverHome>
                <serverName>test</serverName>
            </configuration>                
        </plugin>
    </plugins>
    ...
</build>

Icon that indicates the type of topic Reference topic

Terms and conditions for information centers | Feedback


Timestamp icon Last updated: Monday, 21 April 2014
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=phil&product=was-express-iseries&topic=rwlp_maven_installapps
File name: rwlp_maven_installapps.html