This is an example plugin to show a number of techniques that you might employ to your own plugin. There are some slides explaining a bit of it.
mvn install
This requires 2 terminals/etc.. To run the plugin:
mvn hpi:run
.. and to recompile the javascript as you update it:
node/npm run bundle:watch