Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Not A Bug
-
3.6.1
-
None
-
None
Description
I have set the localRepository in the d disk file 'setting.xml', but the localRepository is invalid when I use 'mvn install' in IDEA.
Maven's official documents( https://maven.apache.org/settings.html )mention that the setting file has priority, but there is no setting file in my user directory.
What should I do? The setting file is as follows:
我已经在d磁盘文件中设置了localRepository。但当我在IDEA中使用“mvn install”时,localRepository无效。
Maven的官方文件(https://maven.apache.org/settings.html)提到设置文件具有优先级,但我的用户目录中没有'setting.xml'。
我应该怎么做,setting文件内容如下:
<?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"> <localRepository>D:\ProgramFiles\maven3.6\repository</localRepository> <mirrors> <mirror> <id>aliyunmaven</id> <mirrorOf>*</mirrorOf> <name>阿里云公共仓库</name> <url>https://maven.aliyun.com/repository/public</url> </mirror> <mirror> <id>aliyunmaven</id> <mirrorOf>*</mirrorOf> <name>阿里云谷歌仓库</name> <url>https://maven.aliyun.com/repository/google</url> </mirror> <mirror> <id>aliyunmaven</id> <mirrorOf>*</mirrorOf> <name>阿里云阿帕奇仓库</name> <url>https://maven.aliyun.com/repository/apache-snapshots</url> </mirror> <mirror> <id>aliyunmaven</id> <mirrorOf>*</mirrorOf> <name>阿里云spring仓库</name> <url>https://maven.aliyun.com/repository/spring</url> </mirror> <mirror> <id>aliyunmaven</id> <mirrorOf>*</mirrorOf> <name>阿里云spring插件仓库</name> <url>https://maven.aliyun.com/repository/spring-plugin</url> </mirror> <mirror> <id>jboss</id> <name>jboss</name> <url>https://repository.jboss.org/nexus/content/repositories/releases/</url> <mirrorOf>JBoss Releases</mirrorOf> </mirror> <mirror> <id>repo1</id> <mirrorOf>central</mirrorOf> <name>central repo</name> <url>http://repo1.maven.org/maven2/</url> </mirror> </mirrors> </settings>