I am using this plugin in a maven pom.xml:


How to do the same (execute the LdapAnnotationProcessor) with Gradle?

Declare your dependency for the annotationProcessor configuration and if you are not happy with the default path where the generated sources land, configure it on the respective JavaCompile-typed task in the options.

And how can i specify which annotation processor class to run?

Iirc it should just detect all annotation processors and run them.
If you want to restrict to just a specific one, afair you just use options.compilerArgs to specify it using the -processor parameter.