maven项目从私服中下载jar,为什么替换了setting,有问题

maven项目从私服中下载jar,为什么替换了setting,jar可以下载
但是pom里面还是红的 ,但是maven打包的时候 报错 ,求解 立马给分

应该是冲突了、把这个全删了试试

清理一下maven在从新打包试一下

清除 ~/.m2/repository 中下对应的jar 的文件, mvn clean package

会不会是pom.xml文件写的jar包之间依赖有问题。

pom里面是红的说明你可能没有从私服上下载下来,或者是中央仓库,如果你的jar是maven中央仓库也有的jar而不是自己封装到私服里面jar那么及时你替换了setting也是可以从中央仓库里面下载下来你所需要jar包依赖的。

  1. 可能是你的中央仓库的位置不正确,放在C盘.m2 下。
  2. 看下setting文件配置私服的路径是否正确。

在保证你的网络没问题的情况下
1,把你的有问题报红的jar包文件夹都删除,因为有些情况下有的jar包下载不全
2,执行maven update 选中force
3 在依赖贝蒂项目的时候,把相关依赖项目install

如果执行以上情况还不行,把你的报错信息贴出来

经常见到的情况有可能是jar包下载不全,可以尝试将下载下的jar删除掉,确认仓库位置没有问题,重新下载试试

The POM for com.liqiang:icloud:jar:0.0.6 is missing, no dependency information available
Downloading from spring-milestone: https://repo.spring.io/libs-release/com/liqiang/icloud/0.0.6/icloud-0.0.6.jar
Downloading from central: https://repo.maven.apache.org/maven2/com/liqiang/icloud/0.0.6/icloud-0.0.6.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.805 s
[INFO] Finished at: 2018-07-05T17:41:21+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project recoveryAdmin: Could not resolve dependencies for project com.lc.scm:recoveryAdmin:jar:0.0.1-SNAPSHOT: Could not find artifact com.liqiang:icloud:jar:0.0.6 in spring-milestone (https://repo.spring.io/libs-release) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException