settings.xml exists in two places:
1. Installation place: $M2_HOME/conf/settings.xml
2. User’s directory: ${user.home}/.m2/settings.xml
The former is also called global configuration, and the latter is called user configuration. If both exist, their contents will be merged, and user-scoped settings.xml takes precedence.
If you occasionally need to create user-scoped settings, you can simply copy the settings from the Maven installation path to the directory ${user.home}/.m2. The default settings.xml of Maven is a template that contains comments and examples.
It is found that the default setting configuration of many third-party projects is the user directory/.m2/settings.xml
So for convenience, you need to create the .m2 folder yourself and configure settings.xml in it
The online tutorial is to use the command
mvn help:system
After using it, it was found that the .m2 folder was not generated
After searching a lot, I found that the local storage in the default maven must be set as the default, that is, do not set
D:\maven\repository
This line is commented or uncommented, and then execute the mvn help:system command.
Similar Posts:
- From building nexus to building Maven project
- Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1
- [Solved] PHP write file permission failure: file_put_contents: failed to open stream: Permission denied
- [Solved] Maven Error: No compiler is provided in this environment. Perhaps you are running on a JRE rather t…
- Maven Error: Failed to read artifact descriptor for xxx:jar and missing artifact maven dependency
- [Solved] Mac install maven Error: zsh: command not found: MVN
- No JVM could be found on your system [How to Solve]
- Add Samba user prompt failed to add entry for user
- scp:not a regular file
- Android Studio Emulator: PANIC: Cannot find AVD system path. Please define ANDROID_SDK_ROOT (Solved)