rpm-maven-plugin postinstallScriptlet example -


i want build rpm , run 2 script after installation. how can achieve rpm-maven-plugin. example, script is:

/opt/sss/${component.name}/bin/mkdir.sh /opt/sss/${component.name}/bin/starter.sh 

below current pom:

<plugin>                 <groupid>org.codehaus.mojo</groupid>                 <artifactid>rpm-maven-plugin</artifactid>                 <!-- <version>2.0-beta-3</version> -->                 <extensions>true</extensions>                 <executions>                     <execution>                         <goals>                             <goal>rpm</goal>                         </goals>                     </execution>                 </executions>                  <configuration>                     <group>applications</group>                     <release>1</release>                     <name>${component.name}</name>                     <version>${project.version}</version>                     <mappings>                        <mapping>                         <directory>/opt/sss/${component.name}/bin</directory>                             <filemode>775</filemode>                             <username>root</username>                             <groupname>super</groupname>                             <sources>                                 <source>                                     <location>bin</location>                                 </source>                             </sources>                         </mapping>                     </mappings>                     <postinstallscriptlet>bin/mkdir.sh</postinstallscriptlet>                 </configuration>             </plugin> 

i got error when run it:

[error] failed execute goal org.codehaus.mojo:rpm-maven-plugin:2.1.3:rpm (default-rpm) on project installation: unable parse configuration of mojo org.codehaus.mojo:rpm-maven-plugin:2.1.3:rpm parameter postinstallscriptlet: cannot configure instance of org.codehaus.mojo.rpm.scriptlet 

i found solution 1 script. update answer when tried how set 2 script files.

            <postinstallscriptlet>                 <scriptfile>bin/mkdir.sh</scriptfile>                 <fileencoding>utf-8</fileencoding>             </postinstallscriptlet> 

Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -