Maven tomcat插件依赖性错误

时间:2012-11-05 17:30:39

标签: maven maven-tomcat-plugin

我有一个使用tomcat maven插件1.1版的全功能项目。我试图切换到最后一个maven tomcat插件版本,在pom.xml

中指定
<plugin>
            <groupId>org.apache.tomcat.maven</groupId>
            <artifactId>tomcat7-maven-plugin</artifactId>
            <configuration>
                <contextFile>src/main/webapp/META-INF/context.xml</contextFile>
            </configuration>
            <dependencies>      
                <dependency>
                    <groupId>mysql</groupId>
                    <artifactId>mysql-connector-java</artifactId>
                    <version>5.1.9</version>
                </dependency>
            </dependencies>
        </plugin>   

但是,使用tomcat7:run而不是tomcat:run启动项目时会出现以下错误:

[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building group-organizer-server 1.0.0-BUILD-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] >>> tomcat7-maven-plugin:2.0:run (default-cli) @ group-organizer-server >>>
[INFO] 
[INFO] --- aspectj-maven-plugin:1.2:compile (default) @ group-organizer-server ---
[INFO] 
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ group-organizer-server ---
[debug] execute contextualize
[WARNING] Using platform encoding (MacRoman actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 1 resource 
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ group-organizer-server ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] <<< tomcat7-maven-plugin:2.0:run (default-cli) @ group-organizer-server <<<
[INFO] 
[INFO] --- tomcat7-maven-plugin:2.0:run (default-cli) @ group-organizer-server ---
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/maven-parent/10/maven-parent-10.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:03.805s
[INFO] Finished at: Mon Nov 05 18:18:32 CET 2012
[INFO] Final Memory: 7M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.0:run (default-cli) on project group-organizer-server: Execution default-cli of goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.0:run failed: Plugin org.apache.tomcat.maven:tomcat7-maven-plugin:2.0 or one of its dependencies could not be resolved: Failed to collect dependencies for org.apache.tomcat.maven:tomcat7-maven-plugin:jar:2.0 (): Failed to read artifact descriptor for org.apache.maven.doxia:doxia-sink-api:jar:1.0: Could not transfer artifact org.apache.maven:maven-parent:pom:10 from/to central (http://repo.maven.apache.org/maven2): No response received after 60000 -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1]     http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException

我该如何解决这个问题?

1 个答案:

答案 0 :(得分:1)

看起来maven central昨天有一些问题。 所以再试一次-U