가상머신에서 ~/.m2/repository 를 찾지 못하는 경우입니다. 




C:\Users\kenu>mvn clean

[ERROR] Could not create local repository at \\vmware-host\Shared Folders\.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


Git Bash를 통해서 mvn 의 경로를 찾았습니다. 제 경우 mvn이 세 가지 이상 설치되었기 때문이죠. Path 환경변수를 확인해도 될 것입니다.

which mvn


해당 maven의 conf폴더에 있는 settings.xml 파일을 다음과 같이 수정했습니다.


<!-- localRepository

   | The path to the local repository maven will use to store artifacts.

   |

   | Default: ~/.m2/repository

  -->

  <localRepository>~/.m2/repository</localRepository>


이후 잘 동작합니다.

+ Recent posts