Maven构建错误 [英] Maven build error

查看:120
本文介绍了Maven构建错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想通过maven构建spring mvc项目,出现以下错误:

I want to build a spring mvc project by maven,I got the following error:

The following artifacts could not be resolved: org.aopalliance:com.springsource.org.aopalliance:jar:1.0.0, org.hibernate:hibernate-validator:jar:4.2.0.Beta1: Could not find artifact org.aopalliance:com.springsource.org.aopalliance:jar:1.0.0 in central (http://repo1.maven.org/maven2)

我使用eclipse和m2eclipse插件.我不知道如何添加本地存储库.而且我发现对于不同版本的Eclipse,结果是不同的.有些可以通过,有些失败.我很困惑.

I use eclipse and m2eclipse plugin. I don't know how to add local repository. And I found for different versions of eclipse,the result is different. Some can pass, some fail.I am confused.

在哪里可以找到m2eclipse中使用的maven版本?

By the way where can I find the version of maven used in m2eclipse?

非常感谢.

更新:现在我可以处理hibernate-validator了,但是即使删除了所有spring mvc依赖项,我发现还有许多其他库都依赖com.springsource.org.aopalliance,

Update:Now I can handle hibernate-validator,but even I deleted all spring mvc dependencies,I found there are many other library are dependent on com.springsource.org.aopalliance,

推荐答案

由于您正在使用spring工件,因此可以参考

Since you are working with spring artifacts, you can refer to this doc. If you are working on released versions of spring, you can add the following repository in your settings.xml

   <repository>
      <id>com.springsource.repository.maven.release</id>
      <url>http://maven.springframework.org/release/</url>
      <snapshots>
          <enabled>false</enabled>
       </snapshots>
   </repository>

aopalliance的groupId/projectId似乎表明它在 spring企业捆绑软件存储库中.可从以下存储库URL访问此内容.

The groupId/projectId of aopalliance seems to indicate it is in spring enterprise bundle repository. The contents of this accessible from the following repository url.

<url>http://repository.springsource.com/maven/bundles/release/</url>

对于hibernate-validator,它是一个beta版本,可能在常规存储库中不可用.它可以从

As for hibernate-validator, being a beta release, it is possibly not available in the normal repos. It is available from

<url>http://repository.jboss.org/nexus/content/groups/public-jboss/</url>

这篇关于Maven构建错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆