---
title: "maven 获取jar从不同的仓库搜寻排序 "
author: "123003473"
date: "2014-01-08T14:48:46Z"
tags: []
categories: ["开源软件"]
slug: "maven-jar"
draft: false
lastmod: "2014-01-08T14:48:46Z"
id: 2001316
url: "https://hck.iteye.com/blog/2001316"
---

maven仓库读取备忘录： 在setting.xml配置了镜像后首先读取镜像的仓库，在没有对应的仓库id,读取setting.xml下标签下的仓库id,如果没有相对应url或者jar， 再读取项目下 pom.xml下标签下的仓库，如果没有相对应的url或者jar，在读取maven默认的中央仓库，如果没有就报错了！ maven 项目下 pom.xml配置仓库 \[code="java"] test http://192.168.0.114:8081/nexus/content/groups/public/ true false \[/code] maven setting.xml下标签配置 \[code="java"] dev testrepositoryok Repository for JDK 1.4 builds http://192.168.0.114:8081/nexus123/content/groups/public/ default always 激活 dev \[/code] maven setting.xml下标签配置 \[code="java"] mirrorId testrepositoryok1 newtec xxh Mirror http://192.168.0.114:8081/nexus/content/groups/public/ \[/code]