Maven:org.codehaus.mojo的POM在哪里:tomcat-maven-plugin:jar:2.2?

时间:2014-11-07 01:25:39

标签: java maven maven-tomcat-plugin

$ 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]

主要的pom.xml文件位于http://kopy.io/Nfcic

什么是“本地存储库”?

简而言之,我现在该怎么做?

2 个答案:

答案 0 :(得分:1)

您的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>

这些回购中没有一个包含您尝试下载的插件。您需要在包含插件的pom中添加其他存储库,或者您需要将插件存储在repo中,以便maven可以找到它。

尝试添加http://maven.apache.org/repository/

本地存储库是maven存储它下载的文件的地方。该消息告诉你罐子没有下载。

答案 1 :(得分:1)

简单的答案是,因为你使用的是错误的groupId。

<dependency>
    <groupId>org.apache.tomcat.maven</groupId>
    <artifactId>tomcat-maven-plugin</artifactId>
    <version>2.2</version>
</dependency>