zoukankan      html  css  js  c++  java
  • maven本地仓库配置文件

    背景:在使用maven的过程中,感觉本地的jar包位置飘忽不定,归根结底是因为对maven的配置文件理解不清楚造成的。

    在maven的安装包下面D:apache-maven-3.6.1conf有settings.xml文件,可以设置相应的仓库

    <localRepository>D:
    epository.m2</localRepository>

     PS:不要配置用户的环境变量,就使用全局的即可。

    Windows 下Maven安装配置(本地仓库配置)

    Windows 下Maven安装配置(本地仓库配置)

    问题排查

    to execute goal on project dubhe_account_core_common: Could not resolve dependencies for project com.jd.jr.fintech.dubhe.account:dubhe_account_core_common:jar:1.0.0: Could not find artifact com.jd.jmq:jmq-client-spring:jar:2.1.5 in central (https://repo.maven.apache.org/maven2) -> [Help 1]
    [ERROR] 

     今天在Intellij下面使用mven命令打依赖树,一直报这个错。后来经过师傅的排查,是因为idea中maven命令使用的不是配置的用户settings.xml文件。用的是全局的配置文件。

    maven插件用的是用户配置的命令。

    所以为了统一,settings.xml文件统一用maven安装目录下的配置文件。

    解决思路:

    先在命令行敲相关的mven命令,查看报错的原因

  • 相关阅读:
    查看tls指纹
    并行流
    方法引入2
    方法引入
    Optional.ofNullable
    stream.filter
    stream.skip limit
    反射
    Optional orElseGet
    nginx 预压缩(gzip)
  • 原文地址:https://www.cnblogs.com/lixuwu/p/11156209.html
Copyright © 2011-2022 走看看