修改settings文件?
打开Maven仓库conf文件夹中的settings.xml文件
将远程仓库设置为阿里云私服:
<mirrors>
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
?然后用设置本地仓库地址为自己创建的文件夹
<localRepository>C:\apache-maven-3.6.1\mvn_repository</localRepository>
<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>C:\apache-maven-3.6.1\mvn_repository</localRepository>
在Idea中配置Maven环境
File->settings,搜索Maven
?修改Maven home path:
?修改User settings file

之后自动识别本地仓库地址:

如果没有识别手动修改一下。
?Idea中配置每次新建工程都要配置一次
使用Maven创建webapp,(不使用骨架)
新建JAVA工程,新建Maven模块,然后创建webapp文件夹,目录如下:

?
|