迷茫2017-04-18 10:48:49
大家讲道理2017-04-18 10:48:49
Are you using maven in combination with the IDE or alone? Maybe your settings in the IDE have not been changed
高洛峰2017-04-18 10:48:49
@FullStackDeveloper You are right. The setting.xml in the question is written incorrectly. I actually have settings.xml in the directory. Because I copied the file in the compressed package, the file name is not wrong. Thank you very much for reminding.
@Ruoxi Xiangyan is used in IDEA. Which configuration file is used can be independently configured in IDEA. If not selected, user configuration takes priority by default.
Finally, I found the cause of the problem as follows:
Use the command mvn help:system directly in the terminal to observe the reading of the configuration.
%USERPROFILE% points to the user directory under the C drive, but I accidentally discovered that there is also a user directory under the D drive, and there is also an .m2 directory in this user directory. I thought I was going to the user directory under the C drive, but actually I was going to the user directory under the D drive.
So no matter how I modify the configuration under C drive, it has no effect.