首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >突然,maven不编译

突然,maven不编译
EN

Stack Overflow用户
提问于 2014-07-09 02:34:43
回答 1查看 438关注 0票数 0
代码语言:javascript
复制
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中。

代码语言:javascript
复制
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
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 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故障,那么您可能需要检查如何配置您的上游存储库详细信息,等等。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/24644538

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档