10.6.3. 用 Maven 卸载应用程序
必须具备的条件
本节展示了用 Maven 卸载应用程序的方法。下面的例子使用了 JBoss EAP 6 Quickstarts 里的 jboss-as-helloworld.war 应用程序。helloworld 项目包含了一个初始化了 jboss-as-maven-plugin 的 POM 文件。这个插件提供了在应用服务器里部署和卸载应用程序的简单操作。
过程 10.13. 用 Maven 卸载应用程序
- 打开终端会话并进入包含 Quickstart 例程的目录里。
例 10.12. 进入 helloworld 应用程序目录
[localhost]$ cd /QUICKSTART_HOME/helloworld
- 运行 Maven undeploy 命令来卸载应用程序。
[localhost]$ mvn jboss-as:undeploy
- 查看结果。
- 通过在终端窗口里查看操作日志可以确认卸载。
例 10.13. 卸载 Helloworld 应用程序的通 Maven 确认信息
[INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESSFUL [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1 second [INFO] Finished at: Mon Oct 10 17:33:02 EST 2011 [INFO] Final Memory: 11M/212M [INFO] ------------------------------------------------------------------------
- 卸载在活动应用程序服务器实例的状态流里也可以确认。
例 10.14. 卸载 Helloworld 应用程序的应用服务器确认信息
09:51:40,512 INFO [org.jboss.web] (ServerService Thread Pool -- 69) JBAS018224: Unregister web context: /jboss-helloworld 09:51:40,522 INFO [org.jboss.weld.deployer] (MSC service thread 1-3) JBAS016009: Stopping weld service for deployment jboss-helloworld.war 09:51:40,536 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015877: Stopped deployment jboss-helloworld.war (runtime-name: jboss-helloworld.war) in 27ms 09:51:40,621 INFO [org.jboss.as.repository] (management-handler-thread - 10) JBAS014901: Content removed from location /home/username/EAP_HOME/jboss-eap-6.3/standalone/data/content/44/e1f3c55c84b777b0fc201d69451223c09c9da5/content 09:51:40,621 INFO [org.jboss.as.server] (management-handler-thread - 10) JBAS018558: Undeployed "jboss-helloworld.war" (runtime-name: "jboss-helloworld.war")
从服务器服务器里卸载了应用程序。

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.