[英]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.