zoukankan      html  css  js  c++  java
  • 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
  • 相关阅读:
    SpringBoot 部署 docker 打包镜像
    Android上dip、dp、px、sp等单位说明(转)
    mac下svn问题——“.a”(静态库)文件无法上传解决
    Mac OS X 访问 Windows 共享文件夹
    svn不能添加.a文件的解决方法
    UIView的剖析(转)
    mac 下真机调试 android 手机
    IOS-synthesize和dynamic的异同(转)
    IOS学习笔记之关键词@dynamic
    【转】APNs消息推送完整讲解
  • 原文地址:https://www.cnblogs.com/xiaofengshan/p/14967358.html
Copyright © 2011-2022 走看看