mvn tomcat7:help的14个命令

本文详细介绍了Tomcat7 Maven Plugin的功能与使用方法,包括部署、重新部署、运行、关闭等14个操作目标,为开发者提供了在Tomcat7.x环境中操作WAR项目的全面指南。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

D:\2018\code\XXX>mvn tomcat7:help
[INFO] Scanning for projects...
[INFO]
[INFO] ---------------------< org.cqupt.mauger:Resource >----------------------
[INFO] Building Resource 0.0.1-SNAPSHOT
[INFO] --------------------------------[ war ]---------------------------------
[INFO]
[INFO] --- tomcat7-maven-plugin:2.2:help (default-cli) @ Resource ---
[INFO] Apache Tomcat Maven Plugin :: Tomcat 7.x 2.2
  The Tomcat Maven Plugin provides goals to manipulate WAR projects within the
  Tomcat 7.x servlet container.

This plugin has 14 goals:

tomcat7:deploy
  Deploy a WAR to Tomcat.

tomcat7:deploy-only
  Deploy a WAR to Tomcat without forking the package lifecycle.

tomcat7:exec-war
  Create a self executable jar file containing all necessary Apache Tomcat
  classes. This allows for using just java -jar mywebapp.jar to run your webapp
  without needing to install a Tomcat instance. More details here.

tomcat7:exec-war-only
  Same as exec-war goal without forking the package lifecycle.

tomcat7:help
  Display help information on tomcat7-maven-plugin.
  Call mvn tomcat7:help -Ddetail=true -Dgoal=<goal-name> to display parameter
  details.

tomcat7:redeploy
  Redeploy a WAR in Tomcat. (Alias for the deploy goal with its update parameter
  set to true.)

tomcat7:redeploy-only
  Redeploy a WAR in Tomcat without forking the package lifecycle. (Alias for the
  deploy-only goal with its update parameter set to true.)

tomcat7:run
  Runs the current project as a dynamic web application using an embedded Tomcat
  server.

tomcat7:run-war
  Runs the current project as a packaged web application using an embedded
  Tomcat server.

tomcat7:run-war-only
  Same as run-war goal without forking the package cycle.

tomcat7:shutdown
  Shuts down all possibly started embedded Tomcat servers. This will be
  automatically done through a shutdown hook or you may call this Mojo to shut
  them down explictly.

  By default the shutdown goal is not bound to any phase. For integration tests
  you might want to bind it to post-integration-test.

tomcat7:standalone-war
  This Mojo will create an executable war file with embedded Tomcat that is also
  capable of being deployed elsewhere.

tomcat7:standalone-war-only
  This Mojo will create an executable war file with embedded Tomcat that is also
  capable of being deployed elsewhere.

tomcat7:undeploy
  Undeploy a WAR from Tomcat.


[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.786 s
[INFO] Finished at: 2018-11-09T10:03:12+08:00
[INFO] ------------------------------------------------------------------------

转载于:https://www.cnblogs.com/wumz/p/9933509.html

The requested profile "tomcat7:run" could not be activated because it does not exist. [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 0.074 s [INFO] Finished at: 2025-06-05T16:04:32+08:00 [INFO] ------------------------------------------------------------------------ [WARNING] The requested profile "tomcat7:run" could not be activated because it does not exist. [ERROR] No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: pre-clean, clean, post-clean, validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-site, site, post-site, site-deploy. -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoGoalSpecifiedException
最新发布
06-07
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值