为什么 XLDeploy-maven-plugin 告诉我我必须在存在时设置“file”或“fileUri”属性

问题描述

我在尝试在 XLDeploy 部署包中定义可部署文件时遇到问题。我的目标是使用 mvn clean install 创建一个 jar 并在部署文件中使用构建中的工件。

为了生成 .dar 文件,我将 XLDeploy-maven-plugin 与目标 xldeploy:generate-deployment-package 一起使用。

当我在 UI 中创建部署包时,添加一个 file.File,上传本地文件并导出 dar,可部署的文件将如下所示:

<configuration>
    <deployables>
        <file.File name="/myPhoto" file="/myPhoto/photo.PNG">
             <tags />
             <scanPlaceholders>true</scanPlaceholders>
             <preScannedplaceholders>true</preScannedplaceholders>
             <placeHolders />
             <checksum>"filehashcode"</checksum>
             <fileEncodings>
                <entry key=".+\.properties">ISO-8859-1</entry>
            </fileEncodings>
            <targetPath>C:/temp</targetPath>
            <createTargetPath>true</createTargetPath>
            <targetFileName>photoFilename.png</targetFileName>
        </file.File>
    </deployables>
</configuration>

如果我在 XLDeploy UI 中提供 fileUri,则 file="myPhoto/photo.PNG" 将消失,而属性 <fileUri>$uri</fileUri> 将是 pre

但是,如果我用 file 替换 /target/artifact.jar 值并删除 tagsplaceholders 等空属性,使用 xldPublishPackage 的管道会给我以下错误

com.xebialabs.deployit.ci.DeployitPluginException: com.xebialabs.deployit.service.importer.ImporterException: artifact /myPhoto should have either 'file' set or have a 'fileUri' property

在这个可部署文件中遗漏了什么或做错了什么。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)