<settingsxmlns="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 | The path to the local repository maven will use to store artifacts. | | Default: ${user.home}/.m2/repository --> <localRepository>D:/Maven/apache-maven-3.8.4/repository</localRepository>
<!-- 中央仓库1 --> <mirror> <id>repo1</id> <mirrorOf>central</mirrorOf> <name>Human Readable Name for this Mirror.</name> <url>http://repo1.maven.org/maven2/</url> </mirror>
<!-- 中央仓库2 --> <mirror> <id>repo2</id> <mirrorOf>central</mirrorOf> <name>Human Readable Name for this Mirror.</name> <url>http://repo2.maven.org/maven2/</url> </mirror>
这样对于文件的配置进本完成,后续有需要可以在添加修改
添加到idea中
注意设置到 IDEA 的全局中
直接搜索maven即可
i : Maven主路径设置为自己的安装路径
ii :用户设置文件设置为Maven的conf文件夹下的settings.xml 文件,并注意后面打上对号