[英]Maven: where is the POM for org.codehaus.mojo:tomcat-maven-plugin:jar:2.2?
$ mvn tomcat:run
[INFO] Scanning for projects...
Downloading: http://objectstyle.org/maven2/org/apache/maven/plugins/maven-eclipse-plugin/2.9/maven-eclipse-plugin-2.9.pom
Downloading/Downloaded: ... [Many more POMs and JARs]
[WARNING] The POM for org.codehaus.mojo:tomcat-maven-plugin:jar:2.2 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 9.151s
[INFO] Finished at: Thu Nov 06 17:07:49 PST 2014
[INFO] Final Memory: 13M/322M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.codehaus.mojo:tomcat-maven-plugin:2.2 or one of its
dependencies could not be resolved: Failed to read artifact descriptor for
org.codehaus.mojo:tomcat-maven-plugin:jar:2.2: Failure to find
org.codehaus.mojo:tomcat-maven-plugin:pom:2.2 in
http://objectstyle.org/maven2/ was cached in the local repository,
resolution will not be reattempted until the update interval of objectstyle
has elapsed or updates are forced -> [Help 1]
The main pom.xml file is at http://kopy.io/Nfcic 主pom.xml文件位于http://kopy.io/Nfcic
What's the "local repository"? 什么是“本地存储库”?
In a nutshell, what do I do now? 简而言之,我现在该怎么办?
Your POM specifies these repositories: 您的POM指定了以下存储库:
<repositories>
<repository>
<id>spring-release</id>
<name>Spring Framework Release Repository</name>
<url>http://maven.springframework.org/release</url>
</repository>
<repository>
<id>spring-milestone</id>
<name>Spring Framework Milestone Repository</name>
<url>http://maven.springframework.org/milestone</url>
</repository>
<repository>
<!-- necessary for Spring Security OAuth SNAPSHOT dependency -->
<id>spring-snapshost</id>
<name>Spring Framework Maven Snapshot Repository</name>
<url>http://maven.springframework.org/snapshot</url>
</repository>
<repository>
<id>objectstyle</id>
<name>ObjectStyle.org Repository</name>
<url>http://objectstyle.org/maven2/</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
None of these repos contain the plugin you are trying to download. 这些存储库均不包含您尝试下载的插件。 Either you need to add additional repositories to your pom that contain the plugin, or you need to get the plugin stored in the repo so maven can find it. 您需要在包含插件的pom中添加其他存储库,或者需要将插件存储在存储库中,以便maven可以找到它。
Try adding http://maven.apache.org/repository/ 尝试添加http://maven.apache.org/repository/
The local repository is where maven stores the files it downloads. 本地存储库是maven存储下载的文件的位置。 That message is telling you the jar wasn't downloaded. 该消息告诉您未下载jar。
The simply answer is, cause you are using the wrong groupId. 简单的答案是,因为您使用的是错误的groupId。
<dependency>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat-maven-plugin</artifactId>
<version>2.2</version>
</dependency>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.