欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

maven中倉(cāng)庫(kù)的配置與優(yōu)先級(jí)的實(shí)現(xiàn)

 更新時(shí)間:2025年07月23日 09:35:50   作者:L-960  
本文介紹Maven倉(cāng)庫(kù)配置,包括settings.xml和pom.xml中的本地倉(cāng)庫(kù)、鏡像及profile設(shè)置,文中通過(guò)示例代碼介紹的非常詳細(xì),需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧

1 倉(cāng)庫(kù)的具體配置

1.1 settings.xml配置本地倉(cāng)庫(kù)

<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配置的倉(cāng)庫(kù)

<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倉(cāng)庫(kù)

<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 結(jié)論

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

  • settings.xml->本地倉(cāng)庫(kù),如果沒(méi)有則向下找
  • settings.xml->profile中的倉(cāng)庫(kù),如果沒(méi)有則向下找
  • pom.xml配置的倉(cāng)庫(kù),如果沒(méi)有則向下找
  • settings.xml->mirror中代理central的倉(cāng)庫(kù)

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

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

  • settings.xml->本地倉(cāng)庫(kù),如果沒(méi)有則向下找
  • settings.xml->mirror中代理*的倉(cāng)庫(kù),如果沒(méi)有則向下找
  • settings.xml->mirror中代理central的倉(cāng)庫(kù)

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

相關(guān)文章

  • Spring Boot 實(shí)現(xiàn)配置文件加解密原理

    Spring Boot 實(shí)現(xiàn)配置文件加解密原理

    這篇文章主要介紹了Spring Boot 實(shí)現(xiàn)配置文件加解密原理,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧
    2020-06-06
  • Spring在SingleTon模式下的線程安全詳解

    Spring在SingleTon模式下的線程安全詳解

    這篇文章主要介紹了Spring在SingleTon模式下的線程安全詳解,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教
    2022-01-01
  • Spring源碼完美導(dǎo)入IDEA的過(guò)程

    Spring源碼完美導(dǎo)入IDEA的過(guò)程

    正值春節(jié)假期,小伙伴私信我idea導(dǎo)入spring源碼的過(guò)程,今天抽空給大家整理一篇教程幫助大家學(xué)習(xí)Spring源碼完美導(dǎo)入IDEA的詳細(xì)過(guò)程,感興趣的朋友一起看看吧
    2022-02-02
  • spring boot實(shí)現(xiàn)過(guò)濾器和攔截器demo

    spring boot實(shí)現(xiàn)過(guò)濾器和攔截器demo

    本篇文章主要介紹了spring boot實(shí)現(xiàn)過(guò)濾器和攔截器demo ,小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過(guò)來(lái)看看吧
    2017-02-02
  • Netty中的DelimiterBasedFrameDecoder使用方法詳解

    Netty中的DelimiterBasedFrameDecoder使用方法詳解

    這篇文章主要介紹了Netty中的DelimiterBasedFrameDecoder使用方法詳解,DelimiterBasedFrameDecoder與LineBasedFrameDecoder類似,只不過(guò)更加通用,允許我們指定任意特殊字符作為分隔符,我們還可以同時(shí)指定多個(gè)分隔符,需要的朋友可以參考下
    2023-12-12
  • Idea中添加Maven項(xiàng)目支持scala的詳細(xì)步驟

    Idea中添加Maven項(xiàng)目支持scala的詳細(xì)步驟

    這篇文章主要介紹了Idea中添加Maven項(xiàng)目支持scala,本文通過(guò)圖文并茂的形式給大家介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下
    2023-03-03
  • Springboot 如何使用@Async整合線程池

    Springboot 如何使用@Async整合線程池

    這篇文章主要介紹了Springboot 使用@Async整合線程池的操作,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教
    2021-06-06
  • 詳解IDEA使用Maven項(xiàng)目不能加入本地Jar包的解決方法

    詳解IDEA使用Maven項(xiàng)目不能加入本地Jar包的解決方法

    這篇文章主要介紹了詳解IDEA使用Maven項(xiàng)目不能加入本地Jar包的解決方法,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧
    2020-08-08
  • 解決Maven項(xiàng)目中 Invalid bound statement 無(wú)效的綁定問(wèn)題

    解決Maven項(xiàng)目中 Invalid bound statement 無(wú)效的綁定問(wèn)題

    這篇文章主要介紹了解決Maven項(xiàng)目中 Invalid bound statement 無(wú)效的綁定問(wèn)題,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教
    2021-06-06
  • Java實(shí)現(xiàn)Shazam聲音識(shí)別算法的實(shí)例代碼

    Java實(shí)現(xiàn)Shazam聲音識(shí)別算法的實(shí)例代碼

    Shazam算法采用傅里葉變換將時(shí)域信號(hào)轉(zhuǎn)換為頻域信號(hào),并獲得音頻指紋,最后匹配指紋契合度來(lái)識(shí)別音頻。這篇文章給大家介紹Java實(shí)現(xiàn)Shazam聲音識(shí)別算法的實(shí)例代碼,需要的朋友參考下吧
    2018-09-09

最新評(píng)論