浅谈maven setting.xml 设置的mirrorof标签作用。
https://blog.csdn.net/whbing1471/article/details/53983779 背景: 写好的java项目放置到linux服务器上进行编辑的时候,由于maven配置问题,出现了一点小问题,然后就使用了默认的maven配置。结果发现下载一个包的时候,总是读取不了。报错结果:1.Archive for required library :'.......jar ' in project 'xxxxxxx' cannot be read or is not a valid zip file。 一直不知道为什么报错,最后无意把window上的下载好的包上传到linux上就OK了。 于是就开始查找这个包的根源问题。 解决办法: 比较一下,发现只有使用的maven仓库不同,window上使用的是阿里云的maven仓库,linux上因为出现问题,使用的是默认的maven仓库。经过上两个仓库网站查看,发现二者的<dependency>标签内容不一样。 阿里写法: <dependency> <groupId>org.springframework</groupId> <artifactId>org.springframework.context</artifactId> <version>3.2.2.RELEASE</version> </dependency>