C:\Users\nanjiang.jx>mvn -version
Apache Maven 2.2.1 (r801777; 2009-08-07 03:16:01+0800)
Java version: 1.6.0_45
Java home: D:\Program Files\Java\jdk1.6.0_45\jre
Default locale: zh_CN, platform encoding: GBK
OS name: "windows 7" version: "6.1" arch: "amd64" Family: "windows"
C:\Users\nanjiang.jx>java -version
java version "1.7.0_60"
Java(TM) SE Runtime Environment (build 1.7.0_60-b19)
Java HotSpot(TM) 64-Bit Server VM (build 24.60-b09, mixed mode)我一直在Java中为一些days.The项目使用maven进行开发,对其他人来说是好的。
今天,我使用了一台新的pc,并设置了像上面这样的env。
当我输入mvn :eclipse时,jar被下载了,但它没有附加到.classpath中。
c:\idlecenter>call mvn clean eclipse:eclipse -DdownloadSources=tru
e
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO] idlecenter-all
[INFO] idlecenter-client
[INFO] idlecenter-dal
[INFO] idlecenter-server
[INFO] Searching repository for plugin with prefix: 'eclipse'.
[INFO] ------------------------------------------------------------------------
[INFO] Building idlecenter-all
[INFO] task-segment: [clean, eclipse:eclipse]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean {execution: default-clean}]
[INFO] Preparing eclipse:eclipse
[INFO] No goals needed for project - skipping
[INFO] [eclipse:eclipse {execution: default-cli}]
[INFO] Not running eclipse plugin goal for pom project
[INFO] Using Eclipse Workspace: null
[INFO] Adding default classpath container: org.eclipse.jdt.launching.JRE_CONTAIN
ER
[INFO] ------------------------------------------------------------------------
[INFO] Building idlecenter-client
[INFO] task-segment: [clean, eclipse:eclipse]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean {execution: default-clean}]
[INFO] Deleting directory I:\idlecenter\idlecenter-client\target
[INFO] Preparing eclipse:eclipse
[INFO] No goals needed for project - skipping
[INFO] [eclipse:eclipse {execution: default-cli}]
[INFO] Using Eclipse Workspace: null
[INFO] Adding default classpath container: org.eclipse.jdt.launching.JRE_CONTAIN
ER
[ERROR] An error occurred during dependency resolution of the following artifact
:
com.ning:compress-lzf:0.6.0
Caused by: Unable to get dependency information: Unable to read the metadata fil
e for artifact 'com.ning:compress-lzf:jar': Cannot find parent: org.sonatype.oss
:oss-parent for project: com.ning:compress-lzf:bundle:0.6.0 for project com.ning
:compress-lzf:bundle:0.6.0
com.ning:compress-lzf:jar:0.6.0发布于 2014-07-09 03:00:33
好吧..。主Maven repos中存在父POM ('org.sonatype.oss:oss- parent :2')。因此,下载它可能有一个短暂的问题。
看看您的本地maven repo (例如“~/.m2/存储库/.”)查看父POM是否存在,并检查Maven是否下载了损坏的副本。(该POM文件看起来与您在此页上看到的相同吗?
如果它是腐败的,你可以尝试吹走“./org.sonatype.oss/.”子树并再次运行Maven。如果您仍然看到Maven故障,那么您可能需要检查如何配置您的上游存储库详细信息,等等。
https://stackoverflow.com/questions/24644538
复制相似问题