下載解壓
在d盤(pán)建立名為maven的文件夾進(jìn)apache-maven-38.4-bin-zip解壓到“D:\maven”中,repo是后期生成的現(xiàn)在不用管
修改D:\maven\conf\settings.xml,配置國(guó)內(nèi)鏡像,jdk17版本
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.2.0 https://maven.apache.org/xsd/settings-1.2.0.xsd">
<localRepository>D:/maven/repo</localRepository>
<mirrors>
<mirror>
<id>aliyunmaven</id>
<mirrorOf>*</mirrorOf>
<name>阿里云公共倉(cāng)庫(kù)</name>
<url>https://maven.aliyun.com/repository/public</url>
</mirror>
</mirrors>
<profiles>
<profile>
<id>jdk-17</id>
<activation>
<activeByDefault>true</activeByDefault>
<jdk>17</jdk>
</activation>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<maven.compiler.compilerVersion>17</maven.compiler.compilerVersion>
</properties>
</profile>
</profiles>
</settings>
配置maven環(huán)境變量
在項(xiàng)目中配置?
配置當(dāng)前項(xiàng)目maven的使用;打開(kāi)idea File->settings...->Build,Execution,Deployment->Build Tools->Maven。修改Maven hone path:?勾選override User settings file: Local repository:?勾選User settings from .mvn/naven.config
點(diǎn)擊Apply? 點(diǎn)擊OK
?配置創(chuàng)建新項(xiàng)目mevn的使用,打開(kāi)idea File->New Projetcs Setup->Settings for new Projetcs...->Build,Execution,Deployment->Build Tools->Maven。修改importing中的JDK for?imorter:
?點(diǎn)擊Apply? 點(diǎn)擊OK
?修改Ruuner中的JRE:? ? ?點(diǎn)擊Apply? 點(diǎn)擊OK
文章來(lái)源:http://www.zghlxwxcb.cn/news/detail-605448.html
用疑問(wèn)可以私信看到會(huì)回復(fù)?文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-605448.html
到了這里,關(guān)于Mven安裝配置、配置國(guó)內(nèi)鏡像,jdk17版本、配置maven環(huán)境變量的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!