加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > Java > 正文

java – Maven程序集插件:无法使用以下命令检索数字文件属性:

发布时间:2020-12-14 19:24:20 所属栏目:Java 来源:网络整理
导读:我在我的OSX 10.7.5上运行与Debian的并行,并且我已将目录与OSX中的 Java源链接到虚拟Debian机器(使用Parallels工具,将目录挂载到/ media / psf /). 编译工作正常,只有我遇到的问题是Maven Assembly插件:抱怨: Failed to retrieve numeric file attributes
我在我的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

我搜索了以下问题: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>

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

编辑:

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"

解决方法

/ bin / sh -c ls -1nlaR {directory_structure / file}
我通过重命名在directory_structure中有Apostrophe(‘)的文件夹来解决它.

创建此问题是因为maven程序集在执行命令/ bin / sh -c ls -1nlaR {directory_structure / file}时没有逃避撇号(‘).

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读