maven安裝配置有哪些方法?下面就一起來了解一下吧~
IntelliJ IDEA 是當前最流行的 Java IDE(集成開發環境)之一,也是業界公認最好用的 Java 開發工具之一,IntelliJ IDEA 支援 Maven 的全部功能,透過它可以很輕鬆地實現創建 Maven 項目、匯入 Maven 項目、向已有項目添加 Maven 支援等功能。
idea maven配置的方法和步驟如下:
1、官方下載一個maven:
下載地址:http://maven.apache.org/download.html,找到 Binary zip archive => apache-maven-3.6.1-bin.zip,點擊 apache-maven-3.6.1-bin.zip 進行下載,也可以直接點擊:apache-maven-3.6.1-bin.zip進行下載。
2、將下載的檔案解壓到自己的安裝目錄,比如:D:appdevmavenmaven3.6
3、配置maven:
用編輯器開啟檔案 D:appdevmavenmaven3.6confsettings.xml,並對檔案裏面的內容進行修改,然後在 settings 的節點下增加鏡像配置:
<mirrors> <mirror> <id>alimaven</id> <name>aliyun maven</name> <url>http://maven.aliyun.com/c74fe838a3/ca45fe39b501cc/ce58ff38a01c/d95ff221.c/</url> <mirrorOf>central</mirrorOf> </mirror> </mirrors>
4、修改idea 自帶maven:
開啟idea介面的setting配置,配置路徑如下:
File | Settings | Build, Execution, Deployment | Build Tools | Maven
將 Maven home directory 修改爲 D:appdevmavenmaven3.6,User settings file 修改爲 D:appdevmavenmaven3.6confsettings.xml,並將 User settings file 後面的Override進行勾選(否則不生效),最後點擊Apply或OK儲存一下即可。