使用 OSC Maven 第三方仓库
2016-10-17 22:33
197 查看
如果您在使用 OSC Maven 时是否遇到了这个问题:
[ERROR] Failed to execute goal on project ...: Could not resolve dependencies for project ...: The following artifacts could not be resolved: com.smart:smart-framework:jar:1.0, ...: Failure to find com.smart:smart-framework:jar:1.0 in http://maven.oschina.net/content/groups/public/ was cached in the local repository, resolution will not be reattempted until the update interval of osc has elapsed or updates are forced -> [Help 1]
或许本文会帮您解决这个问题。
据了解,目前 OSC Maven 已经将所有第三方 jar 包放到了独立的仓库中,该仓库的地址如下:
http://maven.oschina.net/content/repositories/thirdparty/
为了防止与中央仓库同步时导致冲突,目前 thirdparty 仓库与 public 仓库没有任何交集了,也就是说它们是完全独立的,public 不再包括 thirdparty。
所以需要在自己的 setting.xml 中做如下配置(注意绿色文字):
...
<mirror>
<id>osc</id>
<mirrorOf>central</mirrorOf>
<url>http://maven.oschina.net/content/groups/public/</url>
</mirror>
<mirror>
<id>osc_thirdparty</id>
<mirrorOf>thirdparty</mirrorOf>
<url>http://maven.oschina.net/content/repositories/thirdparty/</url>
</mirror>
...
</mirrors>
...
<profile>
<id>osc</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>osc</id>
<url>http://maven.oschina.net/content/groups/public/</url>
</repository>
<repository>
<id>osc_thirdparty</id>
<url>http://maven.oschina.net/content/repositories/thirdparty/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>osc</id>
<url>http://maven.oschina.net/content/groups/public/</url>
</pluginRepository>
</pluginRepositories>
</profile>
...
</profiles>
欢迎使用 OSC Maven 仓库: maven.oschina.net
[ERROR] Failed to execute goal on project ...: Could not resolve dependencies for project ...: The following artifacts could not be resolved: com.smart:smart-framework:jar:1.0, ...: Failure to find com.smart:smart-framework:jar:1.0 in http://maven.oschina.net/content/groups/public/ was cached in the local repository, resolution will not be reattempted until the update interval of osc has elapsed or updates are forced -> [Help 1]
或许本文会帮您解决这个问题。
据了解,目前 OSC Maven 已经将所有第三方 jar 包放到了独立的仓库中,该仓库的地址如下:
http://maven.oschina.net/content/repositories/thirdparty/
为了防止与中央仓库同步时导致冲突,目前 thirdparty 仓库与 public 仓库没有任何交集了,也就是说它们是完全独立的,public 不再包括 thirdparty。
所以需要在自己的 setting.xml 中做如下配置(注意绿色文字):
配置 mirror
<mirrors>...
<mirror>
<id>osc</id>
<mirrorOf>central</mirrorOf>
<url>http://maven.oschina.net/content/groups/public/</url>
</mirror>
<mirror>
<id>osc_thirdparty</id>
<mirrorOf>thirdparty</mirrorOf>
<url>http://maven.oschina.net/content/repositories/thirdparty/</url>
</mirror>
...
</mirrors>
配置 profile
<profiles>...
<profile>
<id>osc</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>osc</id>
<url>http://maven.oschina.net/content/groups/public/</url>
</repository>
<repository>
<id>osc_thirdparty</id>
<url>http://maven.oschina.net/content/repositories/thirdparty/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>osc</id>
<url>http://maven.oschina.net/content/groups/public/</url>
</pluginRepository>
</pluginRepositories>
</profile>
...
</profiles>
欢迎使用 OSC Maven 仓库: maven.oschina.net
相关文章推荐
- maven 使用第三方仓库
- maven使用中央仓库没有的jar包001---Maven自定义上传第三方包到3rd party(第三方无依赖jar和本地扩展类加入maven统一管理)
- 使用Nexus管理Maven仓库时,上传带依赖的第三方jar
- 第三方Maven仓库地址使用
- 使用Nexus管理Maven仓库时,上传带依赖的第三方jar
- 使用 OSC Maven 仓库
- 使用Nexus管理maven仓库,setting文件理解
- Maven的使用,Nexus建立本地仓库以及Eclipse导入Maven项目(一): 准备篇
- Maven的使用,Nexus建立本地仓库以及Eclipse导入Maven项目(二): 安装篇
- 使用Maven-建立自己的本地仓库
- 搭建企业级Maven中央仓库以及Maven的使用
- Maven实战(五)使用maven开发的项目,如何更方便地提取第三方包
- maven配置使用nexus仓库
- [centos5.4 x86 64位]使用第三方软件仓库|使用RPMForge软件库
- 使用nexus代理maven仓库更新索引笔记
- 使用Nexus搭建Maven代理仓库
- Maven本地仓库nexus配置与使用
- 使用nexus构建内部Maven仓库
- 使用Nexus创建Maven私有仓库
- Scientific linux 6 使用第三方软件仓库(转)