1.概述:
参考资料:
1)maven官网教程: See theGuide to Configuring Maven for more information.
2)
- The defaults for Maven are often sufficient【足够的,充分的】, but if you need to change the cache location or are behind a HTTP proxy, you will need to create configuration.
- maven的相关配置有三个层面的配置:Installation、User、Project这三个层面的配置。
- User层面的配置,修改 ${user.home}/.m2/settings.xml.即本地资源库中的settings.xml文件,更多详细配置信息参见full reference,也可以直接参考settings.xml文件,该文件中详细介绍了各个标签的实际意义。
2.配置实例:
2.1实例一:修改maven的本地资源库的位置
默认情况下是${user.home}/.m2/repository/,用户可以根据需要将其修改成自定义的路径,如改成D:/MyLocalMavenRepository.
具体操作办法:修改setting.xml文件中的<localRepository>标签