MyHelper2018
MyHelper2018
采纳率0%
2018-10-11 06:19 阅读 13.8k

maven引入springcloud报错,求解决方案

5

maven项目引入springcloud相关jar报错

            <parent>标签标错
    For artifact {org.springframework.cloud:spring-cloud-starter-consul-discovery:null:jar}: The version cannot be empty. (org.apache.maven.plugins:maven-resources-plugin:3.0.1:testResources:default-testResources:process-test-resources)

            <dependency>标签报错
            Project build error: Non-resolvable import POM: Failure to find org.springframework.cloud:spring-cloud-dependencies:pom:Finchley.M7 in http://maven.aliyun.com/nexus/content/groups/public was cached in the local repository, resolution will not be reattempted until the update interval of window-aliyun has elapsed or updates are forced
  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

3条回答 默认 最新

  • ApatheCrazyFan ApacheCrazyFan 2018-10-11 06:30

    所料不错应该是没有写 <version></version>

    点赞 2 评论 复制链接分享
  • ththcc CZ__ 2018-10-11 06:36

    第一个是标签报错,提示version不能为空,说明你的引用没有version标签
    第二个是报错,提示spring-cloud-dependencies找不到,本地是否没缓存?

    点赞 2 评论 复制链接分享
  • MyHelper2018 MyHelper2018 2018-10-11 10:31
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.0.1.RELEASE</version>
    </parent>
    
        <dependencies>
        <!-- 支持zuul网关 -->
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-netflix-zuul</artifactId>
        </dependency>
        <!-- SpringBoot整合eureka客户端 -->
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
        </dependency>
    
        。。。。。
    
    点赞 评论 复制链接分享

相关推荐