我試過以下命令其正常工作
C:\Documents and Settings\users>mvn -v Apache Maven 3.0 (r1004208; 2010-10-04 17:20:56+0530) Java version: 1.6.0_21 Java home: C:\Program Files\Java\jdk1.6.0_21\jre Default locale: en_US, platform encoding: Cp1252 OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"
有一次我試圖編譯簡單HelloWorld.java
程序。它給我下面的錯誤...
C:\my-app>mvn compile [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building Maven Quick Start Archetype 1.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ Downloading: repo1.maven.org/maven2/org/apache/maven/plugins/maven-resour ces-plugin/2.4.3/maven-resources-plugin-2.4.3.jar [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.454s [INFO] Finished at: Thu Nov 18 13:08:50 IST 2010 [INFO] Final Memory: 1M/15M [INFO] ------------------------------------------------------------------------ [ERROR] Plugin org.apache.maven.plugins:maven-resources-plugin:2.4.3 or one of i ts dependencies could not be resolved: Could not transfer artifact org.apache.ma ven.plugins:maven-resources-plugin:jar:2.4.3 from central (http://repo1.maven.or g/maven2): Error transferring file: Connection refused: connect -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit ch. [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 rea d the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResoluti onException
請任何人用適當的解決方案更新我。