- 在开发环境中,我配置好了自己的私服nexus, 里面阿里云,geo等等的资源库代理都写好了, 按理说只要连上我们的私服, 公共的jar包下载应该不是问题, 但是发现还是下载不了maven-compiler-plugin等等 的maven插件
- 经过测试研究发现,maven的 pluginRepositories 属性没有配置, 如果不写pluginRepositories ,plugins还是走默认的maven仓库, repositories 和 pluginRepositories 都写好之后, 全部都会从私服下载了.
SES Releases SES Releases http://192.168.168.198:2019/repository/ses-releases SES Snapshots SES Snapshots http://192.168.168.198:2019/repository/ses-snapshots SES_Repositories SES_Repositories http://192.168.168.198:2019/repository/ses/ true true always SES_Plugin_Repositories SES_Plugin_Repositories http://192.168.168.198:2019/repository/ses/ true false
- 需要注意的一点maven setting.xml 配置文件中 mirror这个配置
aliyunmaven * 阿里云公共仓库 https://maven.aliyun.com/repository/public
注意maven下载的流程
- 找pom的repository, 确定远程仓库地址
- 找到settings.xml文件, mirror这个配置, mirror相当于一个拦截器, 按照上面的写法, 所有的jar请求都转到aliyun去了,就不会再去私服下载了,
- 所以要注意mirror这一点, 所有的请求代理都应该在nexus私服创建好, 不要让mirror 把请求带跑偏了.开发人员打开项目就行,不需要自己再配置mirror.



