When I reinstall myeclipse7.0 and obtain the code again, the following error occurs:
11-2-10 09:57:31 A.M.: [info] user settings file does not exist C:/Documents and Settings/zhangsb/. m2/settings. xml
11-2-10 09:57:41 A.M.: [info] user settings file does not exist C:/Documents and Settings/zhangsb/. m2/settings. xml
11-2-10 09:57:49 A.M.: Unable to update index for the central http://repo1.maven.org/maven2/
Search for online articles and organize them as follows:
When we update Maven in myeclipse, the error user setting file does not exist C:/Documents and Settings/zhangsb/may be reported /. m2/settings. XML, so that the update fails. This error is prompted when SVN is used to obtain the source code of the new version. If the user name is different, the directories in the path will be different.
After studying the official description of Maven, the solution is as follows: Set setting under the/conf directory of Maven. copy XML to C:/Documents and Settings/zhangsb /. m2/directory.
Through research, we can solve another problem: If we modify the setting under the/conf directory of Maven installation directory. the repository value of XML, so that the new jar is not in C:/Documents and Settings/zhangsb /. m2/exists in the new directory, but in fact this does not affect the location of the jar package downloaded during Maven execution. This is because C: /Documents and Settings/zhangsb /. m2/setting. the impact of XML on maven. Since the C:/Documents and Settings/zhangsb/. m2/setting. xml file does not change, it is useless to modify setting. xml under the/conf directory of Maven.
(URL: http://maven.apache.org/settings.html)
TheSettingsElement inSettings. xmlFile contains elements used to define values which configure Maven execution in various ways, likePom. xml, But shoshould not be bundled to any specific project, or distributed to an audience. These include values such as the local repository location, alternate remote repository servers, and authentication information.
There are two locations whereSettings. xmlFile may live:
- The Maven install:$ M2_home/CONF/settings. xml
- A user's install:$ {User. Home}/. m2/settings. xml
The formerSettings. xmlAre also called global settings, the latterSettings. xmlAre referred to as user settings. If both files exists, their contents gets merged, with the user-specificSettings. xmlBeing dominant.
Tip: If you need to create user-specific settings from scratch, It's easiest to copy the global settings from your Maven installation to your$ {User. Home}/. m2Directory.
Translation:
Settings. the settings element in XML includes the elements used for value-based execution. These values are configured in multiple ways for Maven to execute, such as pom. XML, but it does not need to be bound to any specific project or assigned to a user. These values include the location of the local repository, the remoterepository server, and the authentication information.
Settings. xml may exist in two locations:
1: Maven installation path $ m2_home/CONF/settings. xml
2: The user installs $ {user. Home}/. m2/settings. xml
The preceding settings. XML is also called global configuration, and the latter settings. XML is used for user configuration. If both files exist and their contents are merged, user-specific settings. XML becomes the dominant file.
TIPS: If you need to create user-specific settings from scratch. XML, the simplest way is to copy the global configuration from your Maven installation path to your $ {user. home }/. m2 directory.
For more information about Maven, see http://baike.baidu.com/view/336103.htm.
For free, visit http://www.javaeye.com/wiki/hzbook/2872-maven-in-action.
Conclusion afterwards
This prompt shows that I do have this directory for comparison, but it does not affect the actual use if I ask an experienced colleague, so I did not actually handle it. Even though I still prompted it one or two days ago, it runs normally; later, the corresponding files are stored in the directory and no longer prompted.