构建Maven mvn clean install时出错

时间:2014-11-17 09:02:20

标签: maven pom.xml

因为我是maven build的新手。我一直在尝试使用mvn clean install构建我的项目。

收到错误,如下所示

[ERROR] Failed to execute goal on project g-ff: Could not resolve dep
endencies for project com.c:g-ff:jar:0.0.1-SNAPSHOT: Failure t
o find com.c:RXTXcomm:jar:2.2 in http://repo.maven.apache.org/maven2 was
cached in the local repository, resolution will not be reattempted until the upd
ate interval of central has elapsed or updates are forced -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal o
n project g-ff: Could not resolve dependencies for project com.c:g-ff:jar:0.0.1-SNAPSHOT: Failure  
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDe
pendencies(LifecycleDependencyResolver.java:210)
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resol
veProjectDependencies(LifecycleDependencyResolver.java:117)

    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun
    cher.java:290)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
    a:230)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
    uncher.java:409)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
    352)
    Caused by: org.apache.maven.project.DependencyResolutionException: Could not res
    olve dependencies for project com.c:g-ff:jar:0.0.1-SNAPSHOT: F

    ... 22 more
    Caused by: org.sonatype.aether.resolution.DependencyResolutionException: Failure
    to find com.c:RXTXcomm:jar:2.2 in http://repo.maven.apache.org/maven2 wa
    s cached in the local repository, resolution will not be reattempted until the u
    pdate interval of central has elapsed or updates are forced
    at org.sonatype.aether.impl.internal.DefaultRepositorySystem.resolveDepe
    ndencies(DefaultRepositorySystem.java:375)
    at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(D
    efaultProjectDependenciesResolver.java:183)
    ... 23 more

  [ERROR] After correcting the problems, you can resume the build with the command

   [ERROR]   mvn <goals> -rf :g-fff

任何PLZ能帮助我解决这个问题吗?

此致

DRD

1 个答案:

答案 0 :(得分:-1)

您需要将工件:com.c:RXTXcomm:jar:2.2(groupId:com.c / artifactId:RXTXcomm / version:2.2)添加到本地maven存储库。看来这是你自己的文物之一?而且在Maven Central中没有一个可用。通常mvn clean install(没有错误)会将它放在您的本地存储库中。

如果是公司存储库中的工件,请尝试删除包含该文件的本地存储库中的文件夹(或应包含该文件)。可能存在问题,maven不会再次尝试再次下载。

奇怪的是第一个错误com.c为groupId,原因是:“com.covidien” - 你修改了吗?因为看起来缺少两个工件。