我是这个maven概念的新手,我正在构建一个我想要robospice lib的android应用程序。 Rebospice演示示例需要maven clean install。我在我的ubuntu 12.04上安装了maven
mvn -v
Apache Maven 3.0.4
Maven home: /usr/share/maven
Java version: 1.7.0_10, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-7-oracle/jre
Default locale: en_IN, platform encoding: UTF-8
OS name: "linux", version: "3.2.0-35-generic-pae", arch: "i386", family: "unix"
然后我在我的演示项目上尝试了maven clean install,它给出了以下错误
[WARNING] The POM for com.octo.android.robospice:robospice:jar:1.3.2-SNAPSHOT is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.351s
[INFO] Finished at: Mon Jan 21 15:15:55 IST 2013
[INFO] Final Memory: 10M/124M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project robospice-sample-core: Could not resolve dependencies for project com.octo.android.robospice:robospice-sample-core:apk:1.0.0-SNAPSHOT: Could not find artifact com.octo.android.robospice:robospice:jar:1.3.2-SNAPSHOT -> [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/DependencyResolutionException.
这背后的问题是什么..需要帮助解决这个问题....
答案 0 :(得分:2)
您可能必须配置您的maven存储库(您告诉maven从哪里获取依赖项)
OR
第一次尝试下载文物时出了点问题。
如果是后者,可以通过浏览“.m2”文件夹来解决问题,然后查看相应的文件夹是否只包含元数据文件,还是包含jar和pom。我看错了,您可以删除该文件夹并重试构建您的项目。
顺便说一下,似乎这个项目“robospice”有一个更新的版本可用(并且稳定,不是快照),所以你可能想尝试使用1.3.1而不是1.0.0 SHAPSHOT,如果它适合满足您的项目需求。