Maven设置snapshot无法在远程仓库下载的问题解决
2018-01-19 17:45
537 查看
检查步骤如下:
1、检查nexus是否纳入public版本中:
2、配置中是否启用snapshots功能。以下方法两种设置都可以,任选一个即可。
一种是在项目pom.xml使用:
另外一种是直接在maven的settings.xml中体现:
activeProfile一定要加,不然配置不生效。结构很简单,以profile的形式引入,pluginRepository节点可以不用引入,但是snapshots enabled必须设置为true。
可以查看配置是否生效:
参考:
https://www.cnblogs.com/2005wind/p/4899983.html(以上内容转自此篇文章)
http://blog.sina.com.cn/s/blog_70ae1d7b0102wo9h.html
http://blog.csdn.net/xiaojianpitt/article/details/7818161
http://maven.apache.org/settings.html
1、检查nexus是否纳入public版本中:
2、配置中是否启用snapshots功能。以下方法两种设置都可以,任选一个即可。
一种是在项目pom.xml使用:
<repositories> <repository> <id>test-nexus</id> <name>test</name> <url>http://192.168.1.253/nexus/content/groups/public/</url> <snapshots> <enabled>true</enabled> </snapshots> </repository> </repositories>
另外一种是直接在maven的settings.xml中体现:
<profiles> <profile> <id>nexus</id> <repositories> <repository> <id>central</id> <name>Nexus</name> <url>http://192.168.1.253/nexus/content/groups/public/</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>central</id> <name>Nexus</name> <url>http://192.168.1.253/nexus/content/groups/public/</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </pluginRepository> </pluginRepositories> </profile> </profiles> <activeProfiles> <activeProfile>nexus</activeProfile> </activeProfiles>
activeProfile一定要加,不然配置不生效。结构很简单,以profile的形式引入,pluginRepository节点可以不用引入,但是snapshots enabled必须设置为true。
可以查看配置是否生效:
mvn help:effective-pom 或者 mvn compile -U
参考:
https://www.cnblogs.com/2005wind/p/4899983.html(以上内容转自此篇文章)
http://blog.sina.com.cn/s/blog_70ae1d7b0102wo9h.html
http://blog.csdn.net/xiaojianpitt/article/details/7818161
http://maven.apache.org/settings.html
相关文章推荐
- 解决osx中maven总是下载jar包到eclipse自带仓库的问题
- Windows 2003 +iis 6.0 中Silverlight错误,无法下载Silverlight应用程序。请查看Web服务器设置." 问题的解决方法
- maven镜像路径 解决maven无法下载包的问题
- maven:解决无法下载非中央仓库的jar
- 解决“使用svn时,无法连接maven仓库”的问题。
- 解决maven无法下载jar的问题
- Maven设置本地仓库及依赖包下载不全的解决方法
- 解决从SVN导入maven项目pom.xml无法下载的问题
- Maven安装成功后,总是无法成功mvn install?解决方法是JDK设置的问题。
- 解决 Maven oracle驱动无法下载到的问题
- 解决MAVEN无法从中央库下载问题
- Maven设置本地仓库及依赖包下载不全的解决方法
- Navicat远程无法连接mysql问题解决(附MAC上NavicatPremium11.1.8破解中文版下载链接)
- 解决 Maven oracle驱动无法下载到的问题
- [问题解决] maven仓库下载缓慢
- maven 无法下载bundle类型的问题解决办法
- maven无法从远程仓库更新jar包的问题处理-- Failure to transfer xxx.jar
- 解决maven仓库有jar包但是maven程序无法下载仓库jar包
- "... 无法下载Silverlight应用程序。请查看Web服务器设置." 问题的解决方法