No announcement yet.

Execute jar file from POST-COMMIT hook

  • Filter
  • Time
  • Show
Clear All
new posts

  • Execute jar file from POST-COMMIT hook


    Thanks in advance for the response.

    i am trying to execute a jar file in a post commit hook script and it is not happening.
    but In command line, if I execute the post commit script, the jar is getting executed.

    Have given the full path of jar and java in the script.

    Much appreciated your help.

  • #2
    The most likely issue here is the lack of some critical environment variable due to the fact that the server does not have it in its runtime.

    I normally debug these issues by doing a "printenv > /tmp/myhookenvs.txt" in the hook code and then comparing that to what's in my command line environment. When I find the missing environment and/or value, I update the hook script to make things work.l


    • #3
      Thanks you DougR, I have not setup a full permission for the path where I write the logs. So, I was not able to find whether jar is executing or not.
      Thanks for your time.