Java – Maven assembly plug-in: cannot retrieve digital file properties using the following command: ‘/ bin / SH – C LS – 1nlar

I'm on my OSX 10.7 5, and I have linked the directory with the Java source in OSX to the virtual Debian machine (using the parallels tool, mount the directory to / media / PSF /)

The compilation works normally. The only problem I encountered was Maven assembly plug-in: complaint:

Failed to retrieve numeric file attributes using: '/bin/sh -c ls -1nlaR

I searched for the following questions: http://jira.codehaus.org/browse/MASSEMBLY-588

They suggest using < Directory > ${basedir} < / Directory > in jarlib XML With this modification, the code is compiled, but when using jar TF file When jar checks the contents, it completely lacks all compiled sources and only adds the Maven library

The files that work on the local file system are:

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

Is there any way to overcome this problem?

Edit:

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"

Solution

/ bin / sh -c ls -1nlaR {directory_structure / file}

This problem was created because the Maven assembly did not escape the apostrophe (') when executing the command / bin / SH - C LS - 1nlar {directory_structure / file}

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>