Liberty:Maven 目标 - liberty:undeploy

可以使用 liberty:undeploy 目标从 Liberty 服务器中移除应用程序。

liberty:undeploy 目标将从 Liberty 服务器的 dropins/ 目录中移除所指定的应用程序。该服务器必须存在并且必须正在运行。

参数

下表描述了 undeploy 目标的参数。

表 1. undeploy 目标的参数.

第一列包含参数列表。第二列包含对每个参数的描述,第三列指出此参数是否为必需参数。

参数 描述 必需
serverHome Liberty 服务器安装的目录位置。 是,仅当未设置 assemblyArchive 和 assemblyArtifact 参数时才必须设置此参数。
assemblyArchive Liberty 服务器压缩归档所在的位置。此归档将解包到 installDirectory 参数所指定的目录中。 是,仅当未设置 serverHome 和 assemblyArtifact 参数时才必须设置此参数。
assemblyArtifact Liberty 服务器组合件的 Maven 工件名称。该组合件将安装到 installDirectory 参数所指定的目录中。有关 Liberty 服务器 Maven 组合件的更多信息,请参阅Liberty:作为 Maven 工件进行安装。 是,仅当未设置 serverHome 和 assemblyArchive 参数时才必须设置此参数。
installDirectory 使用组合件归档或工件选项来安装 Liberty 服务器时,该服务器的本地安装目录位置。缺省值为 ${project.build.directory} /liberty。 否
refresh 如果值为 true,那么会将 Liberty 服务器重新安装到本地目录中。仅当使用组合件归档或工件选项来安装此服务器时才使用此参数。缺省值为 false。 否
serverName Liberty 服务器实例的名称。缺省值为 defaultServer。 否
appArchive 要取消部署的应用程序的名称。应用程序类型可为 war、ear、rar、eba、zip 或 jar。 是,如果未设置 appArtifact 参数。
appArtifact 要取消部署的应用程序的 Maven 工件名称。应用程序类型可为 war、ear、rar、eba、zip 或 jar。自 liberty-maven-plugin V1.1 开始。 是,如果未设置 appArchive 参数。
timeout 验证是否已成功完成取消部署时的最长等待时间(以毫秒计)。缺省值为 40 秒。 否
示例:取消部署应用程序
这是可以用在项目的 pom.xml 文件中的代码段。
<build>
    ...
    <plugins>
        <plugin>
            <groupId>com.ibm.websphere.wlp.maven.plugins</groupId>
            	<artifactId>liberty-maven-plugin</artifactId>
            	<version>1.0</version>
            	<executions>
                ...
                <execution>
                    <id>undeploy-app</id>
                    			<phase>post-integration-test</phase>
                    			<goals>
                        				<goal>undeploy</goal>
                    			</goals>
                    <configuration>
                        <appArchive>HelloWorld.war</appArchive>                        
                    </configuration>
                		</execution>
                ...
            </executions>
            <configuration>
                <serverHome>/opt/ibm/wlp</serverHome>
                <serverName>test</serverName>
            </configuration>
        </plugin>
    </plugins>
    ...
</build>
示例:从命令行取消部署应用程序
以下是一个 Maven 命令,可以用来从服务器中移除应用程序。
mvn liberty:undeploy -DserverHome=/opt/ibm/wlp -DserverName=test
                     -DappArchive=HelloWorld.war

用于指示主题类型的图标 参考主题



时间戳记图标 最近一次更新时间: Friday, 16 September 2016
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-dist&topic=rwlp_maven_undeploy
文件名:rwlp_maven_undeploy.html