Maven程序集插件警告“程序集描述符包含文件系统根相对引用". [英] Maven assembly plugin warning "The assembly descriptor contains a filesystem-root relative reference"

查看:306
本文介绍了Maven程序集插件警告“程序集描述符包含文件系统根相对引用".的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从某些程序集插件版本开始,maven构建会发出以下警告:

Starting from some assembly plugin version maven builds issue the following warning:

[警告]程序集描述符包含一个相对于文件系统根目录的文件 参考,该参考与跨平台不兼容/

[WARNING] The assembly descriptor contains a filesystem-root relative reference,which is not cross platform compatible /

是否有推荐的现成解决方案?直接谷歌搜索给我带来了很多垃圾,没有任何实际帮助.重新检查Maven程序集插件帮助没有为我提供答案,也许其他人具有更好的搜索技能并可以提供帮助.

Is there any recommended ready-to-use solution for this? Direct googling provided me with lot of trash and no real help. Re-check of Maven assembly plugin help did not provide answer for me, maybe someone else has better search skill and can help.

更新

是的,这可能是由于类似Linux的outputDirectory,但是我应该如何重写它以便移植?查看了程序集插件文档,但未找到任何可移植性指南.

Yes, this is probably because of Linux-like outputDirectory but how should I rewrite this to be portable? Looked at assembly plugin documentation and not found any portability guide.

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

推荐答案

有效的解决方案是指定空的outputDirectory:

The working solution is to specify the empty outputDirectory:

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

这篇关于Maven程序集插件警告“程序集描述符包含文件系统根相对引用".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆