The default maven repository is
${user.home}/.m2/repository/
but you can use settings.xml ( ${user.home}/.m2/settings.xml
) to change it to a folder that you have permissions on. Or conf/settings.xml in the ${MAVEN_HOME} and change:
<settings>
...
<localRepository>/path/to/local/repo/</localRepository>
...
</settings>
Ideally, you should run maven as yourself and not root to make sure you have permissions or doing 'ksu' first and then use command line.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…