当我使用 Maven 在 NetBeans 中构建项目时,我收到以下警告消息:
[WARNING] DEPRECATED [postinstallScript]: Use postinstallScriplet
[WARNING] DEPRECATED [preinstallScript]: Use preinstallScriplet
[WARNING] DEPRECATED [preremoveScript]: Use preremoveScriplet
我改变
<preinstallScript>src/main/scripts/preinstall</preinstallScript>
<postinstallScript>src/main/scripts/postinstall</postinstallScript>
<preremoveScript>src/main/scripts/preremove</preremoveScript>
至
<preinstallScriptlet>src/main/scripts/preinstall</preinstallScriptlet>
<postinstallScriptlet>src/main/scripts/postinstall</postinstallScriptlet>
<preremoveScriptlet>src/main/scripts/preremove</preremoveScriptlet>
在 pom.xml 中。然后我得到了这个错误:
[ERROR]BUILD ERROR
------------------------------------------------------------------------
Failed to configure plugin parameters for: org.codehaus.mojo:rpm-maven-plugin:2.0.1
(found static expression: 'src/main/scripts/postinstall' which may act as a default value).
Cause: Cannot assign configuration entry 'postinstallScriptlet' to 'class org.codehaus.mojo.rpm.Scriptlet' from 'src/main/scripts/postinstall', which is of type class java.lang.String
并且项目没有建成。这有什么问题?
提前致谢。