maven打包的时候报错:
OS=Windows and the assembly descriptor contains a *nix-specific root-relative-reference (starting with slash)
原因:
在windows上执行assembly任务,但是它包含了相对于linux的路径
解决方法:
- 将outputDirectory节点直接闭合;
- 或是在linux目录前加一个点。
ex:
<fileSets>
<fileSet>
<directory>src/main/resources</directory>
<outputDirectory>/</outputDirectory>
</fileSet>
</fileSets>
改为
<fileSets>
<fileSet>
<directory>src/main/resources</directory>
<outputDirectory>./</outputDirectory>
</fileSet>
</fileSets>