On Wed, Sep 11, 2019 at 4:19 PM Mez Pahlan <[email protected]> wrote: > I tried removing the following from my POM which had the effect of making my > plugin visible again in the snippet generator. > > <build> > <plugins> > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-compiler-plugin</artifactId> > <configuration> > <annotationProcessorPaths> > <path> > <groupId>com.google.dagger</groupId> > <artifactId>dagger-compiler</artifactId> > <version>2.24</version> > </path> > </annotationProcessorPaths> > </configuration> > </plugin> > </plugins> > </build>
Well I checked this artifact and it does define the expected `META-INF/services/javax.annotation.processing.Processor`. Have you tried just adding a `provided`-scope dependency on that, as is suggested for old mojo versions, rather than configuring `maven-compiler-plugin`? That should make everything work, at the minor cost of allowing the build to proceed even if you accidentally linked against a class in that artifact. You can see at https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#annotationProcessorPaths that the suggested configuration *blocks* the compiler from using standard processors, and Jenkins relies on a bunch of them. In other words: the Dagger recommendation for new mojo versions is, at best, incomplete, and arguably very bad advice. It ought to say that you can use `annotationProcessorPaths` only if you are using a new mojo, and either know for a fact that your project uses no other annotation processors, or are willing to enumerate them all in the POM. -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr0j-O%3DTCNowiF%2BZ9Mvm5_4Ptt3FqSMrVV-BFhx3fJyBQQ%40mail.gmail.com.
