在外部postinstallScriptlet
如下,有没有办法访问maven属性,例如${project.artifactId}
? pom.xml 文件包含以下代码片段:
<postinstallScriptlet>
<scriptFile>scripts/postinstall.sh</scriptFile>
<fileEncoding>utf-8</fileEncoding>
</postinstallScriptlet>
这些属性无法直接访问,但您可以使用maven-资源-插件复制资源 http://maven.apache.org/plugins/maven-resources-plugin/copy-resources-mojo.html目标是在从脚本目录复制到目标时应用过滤器。然后,您的 scriptFile 配置需要更改为指向目标下复制的资源。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)