我已经通过我的Mac(OS-Yosemite)终端手动安装了maven。
命令mvn -version
给出以下输出:
> Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06;
> 2015-04-22T17:27:37+05:30) Maven home:
> /Users/shilpa_rajendran/Documents/basicsoft/apache-maven-3.3.3 Java
> version: 1.7.0_71, vendor: Oracle Corporation Java home:
> /Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home/jre
> Default locale: en_US, platform encoding: UTF-8 OS name: "mac os x",
> version: "10.10.4", arch: "x86_64", family: "mac"
但是当我mVn clean
时,我得到以下内容:
[错误]无法在。创建本地存储库 /Users/shilpa_rajendran/.m2/repository - > [帮助1] [错误] [错误]收件人 看到错误的完整堆栈跟踪,用-e重新运行Maven 开关。 [ERROR]使用-X开关重新运行Maven以启用完全调试 日志记录。 [错误] [错误]有关错误和更多信息 可能的解决方案,请阅读以下文章:[错误] [帮助 1] http://cwiki.apache.org/confluence/display/MAVEN/LocalRepositoryNotAccessibleException
答案 0 :(得分:0)
罪魁祸首是m2文件,它通常出现在.m2文件夹创建的位置。只需删除该文件夹并再次运行mvn命令。
答案 1 :(得分:0)
我相信.m2文件夹的路径设置不正确。
Could not create local repository at /Users/shilpa_rajendran/.m2/repository -> [Help 1]
This is showing that not particular path is found to access or create .m2 folder in Maven.
Step 1) Goto .m2 folder and find setting.xml file
Step 2) Open with administrator cmd (WINDOWS)/ sudo command (LINUX).
Step 3) Open Setting.xml file
Step 4) Find <local-reposirtory>
Step 5) You can see your current path : **/Users/shilpa_rajendran/.m2/repository** .
Step 6) Change that path to current .m2 folder location path.
谢谢 可见