错误 OS=Windows 并且程序集描述符包含 *nix 特定的根相对引用(以斜杠开头)/

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/32604733/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-08 19:16:07  来源:igfitidea点击:

ERROR OS=Windows and the assembly descriptor contains a *nix-specific root-relative-reference (starting with slash) /

windowsmavenmaven-assembly-plugin

提问by naXa

I use maven-assembly-plugin v2.5.3 and get the following error

我使用 maven-assembly-plugin v2.5.3 并得到以下错误

[INFO] Reading assembly descriptor: src/main/assembly/distributive.zip.xml
[ERROR] OS=Windows and the assembly descriptor contains a *nix-specific root-relative-reference (starting with slash) /

But the build is SUCCESSFUL. What does this error mean?

但是构建是成功的。这个错误是什么意思?

I've found a mention of it in this issue.

我在这个 issue 中发现了它的提及。

回答by khmarbaise

simplest solution to prevent that warning is:

防止该警告的最简单解决方案是:

<fileSets>
  <fileSet>
    <directory>src/main/resources</directory>
    <outputDirectory/>
  </fileSet>
</fileSets>

or an other solution is:

或其他解决方案是:

<fileSets>
  <fileSet>
    <directory>src/main/resources</directory>
    <outputDirectory>./</outputDirectory>
  </fileSet>
</fileSets>

and it shows that something should be fixed.

它表明应该修复某些东西。

回答by naXa

This is probably because of Linux-like <outputDirectory>:

这可能是因为类似 Linux 的原因<outputDirectory>

<fileSets>
    <fileSet>
        <directory>${basedir}/src/main/resources</directory>
        <outputDirectory>/</outputDirectory>
    </fileSet>
</fileSets>

Specify the empty <outputDirectory>or try ./.

指定空<outputDirectory>或 try ./