IDEA maven上傳速度很慢的解決辦法
maven上傳的速度很慢,排除網(wǎng)絡(luò)原因,需要檢查配置
一、項(xiàng)目配置
以下針對于maven倉庫不在C盤的情況:
File | Settings | Build, Execution, Deployment | Build Tools | Maven
以IDEA為例,打開 File(文件)——Setting(設(shè)置)——Build, Execution, Deployment(構(gòu)建、執(zhí)行、部署)——Build Tools(構(gòu)建工具)—— Maven
如圖,默認(rèn)是C盤的setting和repository,勾選后面的Override,可以重新選定路徑,把自己maven的setting和repository路徑選上,Apply——close即可。
setting文件可能的路徑:E:\maven\apache-maven-3.8.8\conf\setting.xml。一般在解壓后maven文件的conf文件下面,哪個盤看自己裝哪了。
repository文件完全是自己設(shè)置的,就沒有什么參考路徑了。建議也是設(shè)在maven文件附近或者其他容易記住的地方。
這個步驟是每次弄新項(xiàng)目都要做的,除非你的maven就裝在C盤,那就不用改了。
二、maven倉庫配置阿里鏡像
找到setting文件,把里面的內(nèi)容全部替換成以下內(nèi)容:
<?xml version="1.0" encoding="UTF-8"?> <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 | Specifies a repository mirror site to use instead of a given repository. The repository that | this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used | for inheritance and direct lookup purposes, and must be unique across the set of mirrors. | <mirror> <id>mirrorId</id> <mirrorOf>repositoryId</mirrorOf> <name>Human Readable Name for this Mirror.</name> <url>http://my.repository.com/repo/path</url> </mirror> --> <mirror> <id>alimaven</id> <name>aliyun maven</name> <url>http://maven.aliyun.com/nexus/content/groups/public/</url> <mirrorOf>central</mirrorOf> </mirror> <mirror> <id>uk</id> <mirrorOf>central</mirrorOf> <name>Human Readable Name for this Mirror.</name> <url>http://uk.maven.org/maven2/</url> </mirror> <mirror> <id>CN</id> <name>OSChina Central</name> <url>http://maven.oschina.net/content/groups/public/</url> <mirrorOf>central</mirrorOf> </mirror> <mirror> <id>nexus</id> <name>internal nexus repository</name> <!-- <url>http://192.168.1.100:8081/nexus/content/groups/public/</url>--> <url>http://repo.maven.apache.org/maven2</url> <mirrorOf>central</mirrorOf> </mirror> </mirrors> </settings>
保存即可,一般下載maven的時候都會設(shè)置的。
三、卸了重裝
前面兩種方法都不行,而且速度真的很慢,只要不是網(wǎng)絡(luò)原因,真的建議可以重裝,因?yàn)橹匮b非常快。之前下載過的東西重裝以后再下載也是很快的,不用害怕重裝。
四、選用其他版本的插件
下載不下來插件,又不想重裝maven,如果發(fā)現(xiàn)自己明明有同款插件的其他版本,可以去pom.xml里面換一個maven里面已經(jīng)下載過的版本,然后重載maven。但是有些項(xiàng)目對插件的版本是有要求的,不一定能運(yùn)行。
到此這篇關(guān)于IDEA maven上傳速度很慢的解決辦法的文章就介紹到這了,更多相關(guān)IDEA maven上傳速度很慢內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!
相關(guān)文章
SpringBoot中的JPA(Java?Persistence?API)詳解
這篇文章主要介紹了SpringBoot中的JPA(Java?Persistence?API)詳解,JPA用于將?Java?對象映射到關(guān)系型數(shù)據(jù)庫中,它提供了一種面向?qū)ο蟮姆绞絹聿僮鲾?shù)據(jù)庫,使得開發(fā)者可以更加方便地進(jìn)行數(shù)據(jù)持久化操作,需要的朋友可以參考下2023-07-07SpringMVC處理數(shù)據(jù)輸出的實(shí)例代碼
這篇文章主要給大家介紹了關(guān)于SpringMVC處理數(shù)據(jù)輸出的相關(guān)資料,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2021-05-05SpringBoot自定義路由覆蓋實(shí)現(xiàn)流程詳解
這篇文章主要介紹了SpringBoot自定義路由覆蓋實(shí)現(xiàn)流程,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧2023-01-01springboot+idea+maven 多模塊項(xiàng)目搭建的詳細(xì)過程(連接數(shù)據(jù)庫進(jìn)行測試)
這篇文章主要介紹了springboot+idea+maven 多模塊項(xiàng)目搭建的詳細(xì)過程(連接數(shù)據(jù)庫進(jìn)行測試),本文通過圖文并茂的形式給大家介紹的非常詳細(xì),對大家的學(xué)習(xí)或工作具有一定的參考借鑒價值,需要的朋友可以參考下2020-08-08一文簡介Java中BlockingQueue阻塞隊(duì)列
本文主要介紹了一文簡介Java中BlockingQueue阻塞隊(duì)列,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2023-06-06