Tidy up the code that prevents the report running on non-java projects