• mvn编译时绕过本地jar去maven仓库下载问题


    第一种解决方法:


    构建maven项目时,获取某个jar包,该jar包不在maven中央仓库中,在自己搭建的私服仓库中。本地maven仓库已经存在该jar包,编译时却一直提示,官方maven仓库无法获取到该包。

    如下,修改本地maven仓库jar中的_remote.repositories文件进行一些修改即可。具体原因感兴趣的同学可以自行搜索,后续会补充问题的详解。

    例如:

    #NOTE: This is an Aether internal implementation file, its format can be changed without prior notice.
    #Wed Jul 05 17:54:08 CST 2017
    umpay-v40.pom>local-nexus=
    umpay-v40.jar>local-nexus=

    修改为:

    #NOTE: This is an Aether internal implementation file, its format can be changed without prior notice.
    #Wed Jul 05 17:54:08 CST 2017
    umpay-v40.pom>central=
    umpay-v40.jar>central=
    重新编译即可。


    第二种解决方法:


    把本地仓库的jar 包目录删除掉,使用mvn install 命令,手动install 进仓库。


    mvn install:install-file -Dfile=xxx.jar -DgroupId=aaa -DartifactId=bbb -Dversion=1.0.0 -Dpackaging=jar
  • 相关阅读:
    json字符串数组判断其中
    json字符串数组判断其中
    jquery select chosen禁用某一项option
    数据库培训知识
    人员管理模块代码总结2015/8/12整理
    正则表达式在STARLIMS中的应用总结
    控件属性表
    Form-公共代码
    Server-Script公共代码
    Celient-Script公共代码
  • 原文地址:https://www.cnblogs.com/gispathfinder/p/12663430.html
Copyright © 2020-2023  润新知