【问题标题】:Spring 3.0 and MavenSpring 3.0 和 Maven
【发布时间】:2011-10-01 11:51:20
【问题描述】:

我正在尝试使用 Maven 配置 Spring 3.0。我读过http://blog.springsource.com/2009/12/02/obtaining-spring-3-artifacts-with-maven/

在我的 pom.xml 中,我定义了以下存储库:

<repositories>
    <repository>
        <id>com.springsource.repository.bundles.release</id>
        <name>EBR Spring Release Repository</name>
        <url>http://repository.springsource.com/maven/bundles/release</url>
    </repository>
    <repository>
        <id>com.springsource.repository.bundles.external</id>
        <name>EBR External Release Repository</name>
        <url>http://repository.springsource.com/maven/bundles/external</url>
    </repository>
</repositories>

然后我尝试了最基本的依赖:

    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>org.springframework.core</artifactId>
        <version>${org.springframework.version}</version>
    </dependency>

在哪里

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <org.springframework.version>3.0.5-RELEASE</org.springframework.version>
</properties>

但是,如果没有找到他的弹簧芯。

[警告] org.springframework:org.springframework.core:jar:3.0.5-RELEASE 的 POM 丢失,没有可用的依赖信息

[错误] 无法在项目 spring-recipes 上执行目标:无法解析项目 org.obliquid:spring-recipes:war:0.0.1-SNAPSHOT 的依赖项:找不到工件 org.springframework:org.springframework。 core:jar:3.0.5-RELEASE in com.springsource.repository.bundles.release (http://repository.springsource.com/maven/bundles/release) -> [帮助1]

我能做些什么来解决这个问题?

【问题讨论】:

  • 我不确定您是否需要 EBR 副本,但我有一个项目可以与该页面上详述的“来自 Maven Central”的项目完美配合。
  • 是的,我在 Maven Central 方面取得了有限的成功,但并非所有 Javadocs 和源代码都可用。有时我遇到组件问题,但可能是因为我不知道正确的名称。我想直接从 springsource 看看情况是否更好。

标签: java spring maven spring-3


【解决方案1】:

应该是

<org.springframework.version>3.0.5.RELEASE</org.springframework.version>

而不是

<org.springframework.version>3.0.5-RELEASE</org.springframework.version>

【讨论】:

  • 当他们将工件命名为不同于传统的 Maven 工件命名时,这不是你的错。我认为您尝试的应该是名称。
猜你喜欢
  • 2011-01-15
  • 2015-08-12
  • 2019-01-18
  • 2011-12-01
  • 2012-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-07-29
  • 1970-01-01
相关资源
最近更新 更多