What's suggested in the plugin tutorial [1] is to have Eclipse generate class files into a separate folder (that Maven wouldn't use.)
Would that not work for you? [1] https://wiki.jenkins-ci.org/display/JENKINS/Plugin+tutorial On 03/20/2012 08:06 AM, Wannes Sels wrote:
Hi, I'm trying to get the tests of jenkins-git-plugin running on Eclipse 3.7 , but I'm sure my question applies to any other plugin (and probably core). Apparently Eclipse doesn't automatically run annotation processors, you have to tell Eclipse which jars contain the processors you need (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=280542) I've managed to get @Extension processed by adding M2_REPO/net/java/sezpoz/sezpoz/1.9/sezpoz-1.9.jar , but @Initializer doesn't get processed: I don't see target/eclipse-classes/META-INF/annotations/hudson.init.Initializer , only hudson.Extension. I'm guessing only @net.java.sezpoz.Indexable annotations get processed, but not @org.jvnet.hudson.annotation_indexer.Indexed annotations. (Is there a reason why both are used? Seems like these two have the same goal just different implementations)
This is for backward compatibility.
I've tried adding M2_REPO/org/jvnet/hudson/annotation-indexer/1.2/annotation-indexer-1.2.jar and M2_REPO/org/kohsuke/metainf-services/metainf-services/1.2/metainf-services-1.2.jar as annotation processor to no avail. Does anyone know which annotation processor I should add to get this working, or any other solution (that doesn't involve switching IDE or running with maven) ?
If you run maven with -X, maybe it'll run javac in the verbose/debug mode such that it'll spit out the list of annotation processors that it's running.
I'm pretty sure there's a javac option to do it. -- Kohsuke Kawaguchi | CloudBees, Inc. | http://cloudbees.com/ Try Nectar, our professional version of Jenkins
