For the Apache 2 licence to apply to our code we need to have a text file containing the licence in the projects root and some boilerplate text in the header of each java file. To do this were using the plugin license-maven-plugin.
The plugin will load on each compile to check to see if the boiler plate text is in existing files, if its not it gets added automatically.