简体   繁体   中英

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

What's the "local repository"?

In a nutshell, what do I do now?

Your POM specifies these repositories:

    <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.

Try adding http://maven.apache.org/repository/

The local repository is where maven stores the files it downloads. That message is telling you the jar wasn't downloaded.

The simply answer is, cause you are using the wrong groupId.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM