问题:java-IDEA报错 The specified user settings file does not exist
原创
©著作权归作者所有:来自51CTO博客作者szlsay的原创作品,请联系作者获取转载授权,否则将追究法律责任
问题内容:
/Users/air/Library/Java/JavaVirtualMachines/openjdk-15.0.1/Contents/Home/bin/java -Dmaven.multiModuleProjectDirectory=/private/var/folders/mc/bbjk6xkn71j7byjbxw22ln040000gn/T/archetypetmp "-Dmaven.home=/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3" "-Dclassworlds.conf=/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/bin/m2.conf" "-Dmaven.ext.class.path=/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven-event-listener.jar" "-javaagent:/Applications/IntelliJ IDEA.app/Contents/lib/idea_rt.jar=51777:/Applications/IntelliJ IDEA.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath "/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/boot/plexus-classworlds.license:/Applications/IntelliJ IDEA.app/Contents/plugins/maven/lib/maven3/boot/plexus-classworlds-2.6.0.jar" org.codehaus.classworlds.Launcher -Didea.version2020.1.2 -s /Users/air/.m2/settings.xml -Dmaven.repo.local=/Users/air/.m2/repository -DinteractiveMode=false -DgroupId=org.example -DartifactId=maven04 -Dversion=1.0-SNAPSHOT -DarchetypeGroupId=org.apache.maven.archetypes -DarchetypeArtifactId=maven-archetype-webapp -DarchetypeVersion=RELEASE org.apache.maven.plugins:maven-archetype-plugin:RELEASE:generate
[ERROR] Error executing Maven.
[ERROR] The specified user settings file
问题原因:
创建工程时使用 /Users/air/.m2/settings.xml,但实际文件夹没有此文件
问题解决:
进入maven本地的安装目录,将settings拷贝到Users/air/.m2文件夹下