Maven程序集插件:无法使用以下命令检索数字文件属性:'/ bin/sh -c ls -1nlaR

Voj*_*ěch 6 java parallels maven

我在我的OSX 10.7.5上运行与Debian的并行,并且我已经将目录与OSX中的Java源链接到虚拟Debian机器(使用Parallels工具,将目录挂载到/media/psf/).

编译工作正常,只有我遇到的问题是Maven Assembly插件:抱怨:

Failed to retrieve numeric file attributes using: '/bin/sh -c ls -1nlaR
Run Code Online (Sandbox Code Playgroud)

我搜索了以下问题:http://jira.codehaus.org/browse/MASSEMBLY-588

他们建议使用<directory>${baseDir}</directory>jarlib.xml.通过此修改,代码可以编译,但在检查内容时jar tf file.jar,它完全缺少所有已编译的源,只添加了maven库.

在本地文件系统上正常工作的文件是:

<assembly>
  <id>jar-with-dependencies</id>
  <formats>
    <format>jar</format>
  </formats>
  <includeBaseDirectory>false</includeBaseDirectory>
  <fileSets>
    <fileSet>
      <directory>target/classes</directory>
      <outputDirectory>/</outputDirectory>
    </fileSet>
  </fileSets>
  <dependencySets>
    <dependencySet>
      <outputDirectory>/lib</outputDirectory>
      <unpack>false</unpack>
      <scope>runtime</scope>
    </dependencySet>
  </dependencySets>
</assembly>
Run Code Online (Sandbox Code Playgroud)

有没有办法克服这个问题?

编辑:

Apache Maven 2.2.1 (rdebian-4)
Java version: 1.6.0_26
Java home: /usr/lib/jvm/java-6-sun-1.6.0.26/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux" version: "2.6.32-5-amd64" arch: "amd64" Family: "unix"
Run Code Online (Sandbox Code Playgroud)

Kri*_*ket 0

在我们的系统上,这是通过使用最新版本的 maven-assemble-plugin 解决的。

看来根本问题在于名为 Plexus 的依赖项。