As Slaw said, I needed to create a file named javax.annotation.processing.Processor in the directory annotationprocessors\src\main\resources\META-INF\services and put the fully qualified class-name of the processor into that file.
javax.annotation.processing.Processor
annotationprocessors\src\main\resources\META-INF\services