2

Maven RPM Plugin does not generate the scriptlets specified

I'm using maven 3.0.5. I thought the above post answered my question but I am using the rpm-maven-plugin version described in the post.

I have in my pom file a scriptlet that supposed to create a soft link,

<postinstallScriptlet>
    <script>cd /usr/lib64; ln -s libodbccr.so.1.0.0 libodbccr.so</script>
</postinstallScriptlet>

But I don't see the soft link. Any clues?

Community
  • 1
  • 1
Chris F
  • 14,337
  • 30
  • 94
  • 192

1 Answers1

6

I didn't tell the whole story, I actually had this

<postinstallScriptlet>
    <script>cd /usr/lib64; ln -s libodbccr.so.1.0.0 libodbccr.so</script>
    <script>echo "Finished Script"</script>
</postinstallScriptlet>

With postinstallScriptlet only the LAST script is executed, so I had to change it, like this

<postinstallScriptlet>
    <script>
        cd /usr/lib64; \
        ln -s libodbccr.so.1.0.0 libodbccr.so<; \
        echo "Finished Script"
    </script>
</postinstallScriptlet>
Chris F
  • 14,337
  • 30
  • 94
  • 192
  • You should move the first part of your answer to the question (as an edit). Then this would match the Q&A style and I would +1 both. – mschilli Sep 27 '13 at 05:43