does an external script in rpm-maven-plugin have access to maven properties

非 Y 不嫁゛ 提交于 2019-12-02 20:01:09

问题


In an external postinstallScriptlet as follows, is there a way to access maven properties such as ${project.artifactId}? The pom.xml file has this snippet:

<postinstallScriptlet>
    <scriptFile>scripts/postinstall.sh</scriptFile>
    <fileEncoding>utf-8</fileEncoding>
</postinstallScriptlet>

回答1:


The properties are not directly accessible, but you can use the maven-resources-plugin copy-resources goal to apply filters while copying from your scripts directory into target. Your scriptFile configuration would then need to be changed to point to the copied resource under target.



来源:https://stackoverflow.com/questions/27030166/does-an-external-script-in-rpm-maven-plugin-have-access-to-maven-properties

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!