• Maven仓库的目录结构


    _remote.repositories文件

    本地库中的包都有一个_remote.repositories文件,示例:
    image

    #NOTE: This is an Aether internal implementation file, its format can be changed without prior notice.
    #Fri Aug 10 10:04:28 CST 2018
    spring-boot-starter-web-1.5.9.RELEASE.pom>test1-nexus-mirro=
    spring-boot-starter-web-1.5.9.RELEASE.jar>test1-nexus-mirro=
    spring-boot-starter-web-1.5.9.RELEASE.pom>test2-nexus-mirro=
    spring-boot-starter-web-1.5.9.RELEASE.jar>test2-nexus-mirro=
    

    这个文件存储的是每次从私服或者中央仓库下载的jar包的信息。

    第3行:pom文件>私服ID名称

    第4行:jar文件>私服ID名称

    第5、6行:从另一个私服下载的记录

    假设我们更换了私服地址为nexus-abc,并且该私服不存在该资源,那么就会生成logback-parent-1.1.1.pom.lastUpdated文件;
    也就是说,_remote.repositories文件,标示该资源的来源,如果你有这个_remote.repositories,那就会在访问本地的同时,必须确保远程上有才行(这里的远程是setting文件中配置的镜像或远程仓库,用id来进行关联,详情见标题2._remote…),否则就会报错;
    错误信息

    Could not resolve dependencies for project com-hallo-mybatis:generator:jar:1.0-SNAPSHOT: 
    The following artifacts could not be resolved: com.tencent.tsf:spring-cloud-tsf-dependencies:pom:1.1.1-
    RELEASE, com.tencent.tsf:spring-cloud-tsf-sleuth:jar:1.1.1-RELEASE, com.tencent.tsf:spring-cloud-tsf-
    auth:jar:1.1.1-RELEASE: Failure to find com.tencent.tsf:spring-cloud-tsf-dependencies:pom:1.1.1-RELEASE in 
    <span style="color:#ab4642">http://***:8081/repository/public/ was cached in the local repository, resolution 
    will not be reattempted until the update interval of public has elapsed or updates are forced</span>
    

    .jar.sha1文件

    是jar的校验文件

    .pom

    是pom管理描述文件

    .pom.sha1

    是pom的校验文件

    .lastUpdated

    当远程仓库没有该jar时,就会生成该文件,说明该jar下载失败。如果本地仓库有该jar,则删除该文件和_remote.repositories文件,否则删除该依赖之后,用命令强制下载该jar。

    参考

    https://zhuanlan.zhihu.com/p/59058778
    https://www.cnblogs.com/mySummer/p/9453777.html
    https://blog.csdn.net/lovepeacee/article/details/103094247

    XFS
  • 相关阅读:
    博主推荐-工作中常用到一些不错的网址整理
    使用ansible部署CDH 5.15.1大数据集群
    ElasticSearch的API介绍
    HTML&CSS基础-CSS Hcak
    运维开发笔记整理-创建django用户
    运维开发笔记整理-数据库同步
    运维开发笔记整理-QueryDict对象
    运维开发笔记整理-template的使用
    运维开发笔记整理-JsonResponse对象
    运维开发笔记整理-Request对象与Response对象
  • 原文地址:https://www.cnblogs.com/xiaofengshan/p/14967358.html
Copyright © 2020-2023  润新知