【问题标题】:How do I set a dependency on Spring Web Services in my POM.xml如何在我的 POM.xml 中设置对 Spring Web 服务的依赖
【发布时间】:2011-02-07 09:46:52
【问题描述】:

我在很多 Maven 依赖项上都得到了这个,尽管当前的痛苦来源是 Spring。

我将设置一个 Spring 版本并像这样包含它:

 <spring-version>3.0.0.RELEASE</spring-version>

 <!-- Spring framework -->
 <dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-core</artifactId>
    <version>${spring-version}</version>
 </dependency>

按预期工作。

但是,我在设置对 web 服务的 spring-ws-core 的依赖时遇到问题。我可以在任何 repo 中找到的最新版本是 2.0.0-M1。

http://mvnrepository.com/artifact/org.springframework.ws/spring-ws-core

关于我需要在我的 maven POM 中包含什么以使 Spring 3 Web 服务正常工作的任何线索 :)

【问题讨论】:

    标签: web-services spring maven-2 spring-ws


    【解决方案1】:

    好的,

    对maven不太了解。但是spring源有一个可以访问maven的存储库:-

    http://www.springsource.com/repository/app/bundle/version/detail?name=org.springframework.web&version=3.0.2.RELEASE

    看起来像 maven 的东西是

    <dependency>  
     <groupId>org.springframework</groupId>    
     <artifactId>spring-web</artifactId>  
     <version>3.0.2.RELEASE</version> 
    </dependency>
    

    但是,我再次使用 ivy 而不是 maven!

    编辑:

    哦,添加 maven 存储库内容的说明在http://www.springsource.com/repository/app/faq#q8 的常见问题解答中。

    【讨论】:

    • 非常感谢 - 让我走得更远,但是当我这样做时我无法学习重要的课程 - 包 org.springframework.ws.server.endpoint 不存在关于如何的任何线索找到我需要在 Maven 中包含哪个 spring 模块才能得到这个人?谢谢
    • 使用 ivy,它很容易自动完成传递的东西! maven中必须有等效的机制吗? springsource.com/repository/app/bundle/version/…这个好像是导出那个端点包...
    • 您可以展开所需的依赖位以查看它全部依赖的内容。传递依赖可能会吸收更多,因此请确保您只使用您实际需要的范围/配置!
    【解决方案2】:

    嗯,2.0.0-M1 只是 spring-ws-core 的最新版本。

    <dependency>
        <groupId>org.springframework.ws</groupId>
        <artifactId>spring-ws-core</artifactId>
        <version>2.0.0-M1</version>
    </dependency>
    

    实际上,当前的稳定版本是 1.5.9。

    <dependency>
        <groupId>org.springframework.ws</groupId>
        <artifactId>spring-ws-core</artifactId>
        <version>1.5.9</version>
    </dependency>
    

    【讨论】:

      猜你喜欢
      • 2014-03-23
      • 2010-12-05
      • 2016-08-11
      • 2013-11-03
      • 2019-02-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-06-03
      相关资源
      最近更新 更多