最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

maven中倉庫的配置與優(yōu)先級的實現

 更新時間:2025年07月23日 09:35:50   作者:L-960  
本文介紹Maven倉庫配置,包括settings.xml和pom.xml中的本地倉庫、鏡像及profile設置,文中通過示例代碼介紹的非常詳細,需要的朋友們下面隨著小編來一起學習學習吧

1 倉庫的具體配置

1.1 settings.xml配置本地倉庫

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
	<!-- localRepository
   | The path to the local repository maven will use to store artifacts.
   |
   | Default: ${user.home}/.m2/repository
  <localRepository>/path/to/local/repo</localRepository>
  -->
	<localRepository>D:\Program Files\apache-maven-3.6.3\conf\repository</localRepository>
</settings>

1.2 pom.xml配置的倉庫

<project>
    <repositories>
        <repository>
            <id>com.e-iceblue</id>
            <name>e-iceblue</name>
            <url>https://repo.e-iceblue.com/nexus/content/groups/public/</url>
        </repository>
    </repositories>
</project>

1.3 settings.xml配置mirror鏡像

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
	<mirrors>
		<mirror>
			<id>aliyun-central</id>
			<name>aliyun-central</name>
			<mirrorOf>central</mirrorOf>
			<url>https://maven.aliyun.com/repository/central</url>
		</mirror>
		<mirror>
			<id>aliyun-spring</id>
			<name>aliyun-spring</name>
			<mirrorOf>spring</mirrorOf>
			<url>https://maven.aliyun.com/repository/spring</url>
		</mirror>
		<mirror>
			<id>aliyun-spring-plugin</id>
			<name>aliyun-spring-plugin</name>
			<mirrorOf>spring-plugin</mirrorOf>
			<url>https://maven.aliyun.com/repository/spring-plugin</url>
		</mirror>
	</mirrors>
</settings>

1.4 settings.xml配置profile倉庫

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
	<servers>
		<server>
			<id>nexus-server</id>
			<username>uname</username>
			<password>pwd</password>
		</server>
	</servers>
	
	<profiles>
		<profile>
			<id>nexus</id>
			<repositories>
				<repository>
					<id>nexus-server</id>
					<name>Nexus Repository</name>
					<url>https://maven.nexus.com/repository/maven-public/</url>
					<snapshots>
						<enabled>true</enabled>
						<updatePolicy>always</updatePolicy>
					</snapshots>
				</repository>
			</repositories>
		</profile>
	</profiles>

	<!--讓配置生效-->
	<activeProfiles>
		<activeProfile>nexus</activeProfile>
	</activeProfiles>
</settings>

2 結論

2.1 mirror中不代理*的拉取順序

  • settings.xml->本地倉庫,如果沒有則向下找
  • settings.xml->profile中的倉庫,如果沒有則向下找
  • pom.xml配置的倉庫,如果沒有則向下找
  • settings.xml->mirror中代理central的倉庫

2.2 mirror中代理了*的拉取順序

mirror中一旦代理了*,則該配置優(yōu)先級最高,其他的都不會走了。
但是有一種情況除外,就是mirror中代理了central倉庫,那么如果代理*的 mirror中沒有,則會找代理的central倉庫

  • settings.xml->本地倉庫,如果沒有則向下找
  • settings.xml->mirror中代理*的倉庫,如果沒有則向下找
  • settings.xml->mirror中代理central的倉庫

到此這篇關于maven中倉庫的配置與優(yōu)先級的實現的文章就介紹到這了,更多相關maven 倉庫配置與優(yōu)先級內容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關文章希望大家以后多多支持腳本之家! 

相關文章

  • Java線程同步機制_動力節(jié)點Java學院整理

    Java線程同步機制_動力節(jié)點Java學院整理

    在之前,已經學習到了線程的創(chuàng)建和狀態(tài)控制,但是每個線程之間幾乎都沒有什么太大的聯系??墒怯械臅r候,可能存在多個線程多同一個數據進行操作,這樣,可能就會引用各種奇怪的問題?,F在就來學習多線程對數據訪問的控制吧
    2017-05-05
  • java網上圖書商城(4)購物車模塊1

    java網上圖書商城(4)購物車模塊1

    這篇文章主要為大家詳細介紹了java網上圖書商城,購物車模塊,具有一定的參考價值,感興趣的小伙伴們可以參考一下
    2016-12-12
  • 基于Map的computeIfAbsent的使用場景和使用方式

    基于Map的computeIfAbsent的使用場景和使用方式

    這篇文章主要介紹了基于Map的computeIfAbsent的使用場景和使用方式,具有很好的參考價值,希望對大家有所幫助。如有錯誤或未考慮完全的地方,望不吝賜教
    2021-09-09
  • SpringBoot+SpringCache實現兩級緩存(Redis+Caffeine)

    SpringBoot+SpringCache實現兩級緩存(Redis+Caffeine)

    這篇文章主要介紹了SpringBoot+SpringCache實現兩級緩存(Redis+Caffeine),文中通過示例代碼介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友們下面隨著小編來一起學習學習吧
    2021-04-04
  • SpringBoot整合Spring?Security過濾器鏈加載執(zhí)行流程源碼分析(最新推薦)

    SpringBoot整合Spring?Security過濾器鏈加載執(zhí)行流程源碼分析(最新推薦)

    Spring?Boot?對于?Spring?Security?提供了自動化配置方案,可以使用更少的配置來使用?Spring?Security,這篇文章主要介紹了SpringBoot整合Spring?Security過濾器鏈加載執(zhí)行流程源碼分析,需要的朋友可以參考下
    2023-02-02
  • MyBatis中criteria的or(或查詢)語法說明

    MyBatis中criteria的or(或查詢)語法說明

    這篇文章主要介紹了MyBatis中criteria的or(或查詢)語法說明,具有很好的參考價值,希望對大家有所幫助。如有錯誤或未考慮完全的地方,望不吝賜教
    2021-12-12
  • Java Lambda List轉Map代碼實例

    Java Lambda List轉Map代碼實例

    這篇文章主要介紹了Java Lambda List轉Map代碼實例,文中通過示例代碼介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友可以參考下
    2020-03-03
  • 使用IDEA創(chuàng)建maven父子工程項目 (圖文)

    使用IDEA創(chuàng)建maven父子工程項目 (圖文)

    本文主要介紹了使用IDEA創(chuàng)建maven父子工程項目,文中通過示例代碼介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友們下面隨著小編來一起學習學習吧
    2022-04-04
  • 使用BigDecimal除法后保留兩位小數

    使用BigDecimal除法后保留兩位小數

    這篇文章主要介紹了使用BigDecimal除法后保留兩位小數方式,具有很好的參考價值,希望對大家有所幫助。如有錯誤或未考慮完全的地方,望不吝賜教
    2022-06-06
  • SpringBoot MDC全鏈路調用日志跟蹤實現詳解

    SpringBoot MDC全鏈路調用日志跟蹤實現詳解

    這篇文章主要為大家介紹了SpringBoot MDC全鏈路調用日志跟蹤實現詳解,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進步,早日升職加薪
    2023-02-02

最新評論

樟树市| 榆中县| 金阳县| 绥阳县| 渝中区| 青冈县| 碌曲县| 晋州市| 汉源县| 阿拉善盟| 高要市| 石台县| 金山区| 永胜县| 聊城市| 汤阴县| 庄河市| 景德镇市| 西丰县| 商城县| 深水埗区| 河间市| 长乐市| 奉化市| 大洼县| 牙克石市| 贵州省| 城口县| 邹平县| 瑞安市| 山西省| 临沧市| 祁阳县| 新昌县| 华亭县| 文山县| 株洲市| 巴里| 九寨沟县| 唐海县| 运城市|