2012-04-23 86 views
0

我在尝试“mvn package”后收到此消息。它似乎有检索谷歌收集jar的问题,但我不知道这是唯一的问题。Maven程序集插件无法执行

[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] 

回答

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。

+0

啊,看起来像预先“sudo”到“mvn包”允许我创建目录。 – 2012-04-23 18:00:44

+1

这应该在没有超级用户权限的情况下工作......'.m2'和'repository'的所有子目录的权限应该是'drwxr-xr-x'。尝试'chmod u + rwx,g + rx,o + rx /Users/danquach/.m2 -R' – Thor 2012-04-23 18:02:05

+0

目录权限与您所描述的一样。无论如何,我不会以后续的“mvn package”来电,它似乎再次按预期工作。 – 2012-04-23 18:20:40