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

1.2k views Asked by At

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

There are 1 answers

0
Brett Okken On BEST ANSWER

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.