How does one create a hook script?

Hello. The bitbucket hook script page:

https://developer.atlassian.com/server/bitbucket/how-tos/register-maintain-hook-scripts/

shows a couple on interesting code snippets describing how to create a web hook script but no examples. How does wrap these snippets into a usable plugin? Thanks!

1 Like

atlas-run – Can’t find the packages:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.2:compile (default-compile) on project xxx: Compilation failure: Compilation failure:
[ERROR] xxx.java:[26,36] package com.atlassian.bitbucket.hook.script does not exist
[ERROR] xxx.java:[26,134] package com.atlassian.bitbucket.hook.script.HookScriptCreateRequest does not exist
[ERROR] xxx.java:[26,240] package com.atlassian.bitbucket.hook.script does not exist