maven:Could not create local repository at /root/.m2/repository

今天使用docker下的cenos,maven是自带的,出现如下报错

[ERROR] Could not create local repository at /root/.m2/repository -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/LocalRepositoryNotAccessibleException

原因

对该文件没有相关的权限操作。

解决:

修改文件位置,进入maven的安装目录,进入目录修改conf/settings.xml,如下:

注意:

扫描二维码关注公众号,回复: 14936689 查看本文章

查看maven安装路径可用如下命令:

mvn -version

猜你喜欢

转载自blog.csdn.net/u013938578/article/details/130081637
今日推荐