简体   繁体   English

Maven在使用tomcat7-maven-plugin时找不到tomcat7目标

[英]Maven cannot find tomcat7 goal while using tomcat7-maven-plugin

I'm facing a problem while trying to setup my webapp deployment to tomcat 7 using maven tomcat plugin. 尝试使用maven tomcat插件将我的Web应用程序部署设置为tomcat 7时遇到问题。

settings.xml: settings.xml中:

<server>
  <id>server</id>
  <username>admin</username>
  <password>password</password>
</server>

pom.xml: pom.xml中:

<plugin>
  <groupId>org.apache.tomcat.maven</groupId>
  <artifactId>tomcat7-maven-plugin</artifactId>
  <version>2.2</version>
  <configuration>
    <server>server</server>
    <url>http://localhost:8080/manager/text</url>
    <path>/myapp</path>
  </configuration>
</plugin>

When I'm starting to type mvn tom<tab> autocomplete suggests me only mvn tomcat: . 当我开始键入mvn tom<tab>自动完成功能仅提示我mvn tomcat:

The output for mvn tomcat:list is: mvn tomcat:list的输出为:

[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'tomcat'.
[INFO] ------------------------------------------------------------------------
[INFO] Building myapp
[INFO]    task-segment: [tomcat:list]
[INFO] ------------------------------------------------------------------------
[INFO] [tomcat:list {execution: default-cli}]
[INFO] Listing applications at http://localhost:8080/manager
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Cannot invoke Tomcat manager

Embedded error: http://localhost:8080/manager/list
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Sun Dec 22 21:37:08 MSK 2013
[INFO] Final Memory: 13M/211M
[INFO] ------------------------------------------------------------------------

It looks like that the tomcat6-maven-plugin is actually in use. 看起来tomcat6-maven-plugin实际上正在使用中。

The output for mvn tomcat7:list is: mvn tomcat7:list的输出是:

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Required goal not found: tomcat7:list in org.apache.tomcat.maven:tomcat7-maven-plugin:2.2
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Sun Dec 22 21:43:41 MSK 2013
[INFO] Final Memory: 7M/116M
[INFO] ------------------------------------------------------------------------

I'm using Ubuntu 13.10, all software is installed via repository. 我正在使用Ubuntu 13.10,所有软件都是通过存储库安装的。

As far as I know , some goals are yet not available with the tomcat7 mojo and mvn tomcat7:list is one of them. 据我所知,tomcat7 mojo尚未实现某些目标,而mvn tomcat7:list是其中之一。 mvn tomcat6:list is available for the tomcat6 mojo. mvn tomcat6:list可用于tomcat6 mojo。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 jstl的tomcat7-maven-plugin行为-帮助使用tomcat:run目标 - tomcat7-maven-plugin behavior with jstl - help using tomcat:run goal 如何将SASS插件目标绑定到tomcat7部署阶段(Maven) - How to bind SASS plugin goal to tomcat7 deploy phase (maven) 远程服务器上的tomcat7-maven-plugin contextFile - tomcat7-maven-plugin contextFile on remote server 如何部署tomcat7-maven-plugin? - How to deploy tomcat7-maven-plugin? 使用tomcat7-maven-plugin指定要打包的目录 - Specifying which directory to package using tomcat7-maven-plugin 在tomcat7-maven-plugin中定义上下文元素 - Define context elements in tomcat7-maven-plugin 使用tomcat7-maven-plugin的Tomcat部署失败,并显示错误“无法调用Tomcat管理器:对等重置连接:套接字写入错误” - Tomcat deploy using tomcat7-maven-plugin fails with error “Cannot invoke Tomcat manager: Connection reset by peer: socket write error” Tomcat7 Maven插件和JaCoCo - Tomcat7 Maven Plugin and JaCoCo 无法为目标“ exec-war-only”更改tomcat7-maven-plugin的mainClass - Unable to change the mainClass for tomcat7-maven-plugin for goal 'exec-war-only' tomcat7-maven-plugin tomcat7:运行java.lang.LinkageError以前为不同类型的名称加载了名称 - tomcat7-maven-plugin tomcat7:run java.lang.LinkageError previously initiated loading for a different type with name
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM