You don't need to write a plugin, you only need to add a builder to each Java project where you want to invoke your tool. Use project properties -> Builders -> New to either add a small Ant script or an external program. That builder is then invoked each time the eclipse build process runs.
There is a small tutorial in the eclipse help to demonstrate this.