Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Maven程序集插件无法执行_Maven - Fatal编程技术网

Maven程序集插件无法执行

Maven程序集插件无法执行,maven,Maven,我在尝试“mvn包”后收到此消息。似乎在检索google collections jar时出现了问题,但我不确定这是否是唯一的问题 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.3:single (make-assembly) on project recommender: Execution make-assembly of goal org.apache.maven.plug

我在尝试“mvn包”后收到此消息。似乎在检索google collections jar时出现了问题,但我不确定这是否是唯一的问题

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.3:single (make-assembly) on project recommender:
  Execution make-assembly of goal org.apache.maven.plugins:maven-assembly-plugin:2.3:single failed:
  Plugin org.apache.maven.plugins:maven-assembly-plugin:2.3 or one of its dependencies could not be resolved:
  Failed to collect dependencies for org.apache.maven.plugins:maven-assembly-plugin:jar:2.3 ():
  Failed to read artifact descriptor for com.google.collections:google-collections:jar:1.0:
  Could not transfer artifact com.google.collections:google-collections:pom:1.0 from/to central (http://repo1.maven.org/maven2): 
  Specified destination directory cannot be created: /Users/danquach/.m2/repository/com/google/collections/google-collections/1.0 -> [Help 1]

原始错误应为局部问题:

Specified destination directory cannot be created:
/Users/danquach/.m2/repository/com/google/collections/google-collections/1.0
  • 你的车满了吗
  • 你有这个路径的写权限吗

您可以尝试创建
/Users/danquach/.m2/repository/com/google/collections
,然后再次调用maven。

啊,看起来在“mvn package”前面加上“sudo”可以让我创建目录。这应该可以在没有超级用户权限的情况下工作。。。
.m2
存储库
的所有子目录的权限应为
drwxr-xr-x
。请尝试
chmod u+rwx,g+rx,o+rx/Users/danquach/.m2-R
目录权限与您描述的一样..在任何情况下,我都不会在后续的“mvn包”调用中调用超级用户,它似乎又像预期的那样工作了。