-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NoClassDefFoundError in IntelliJ because AutoService has class retention #1032
Labels
Comments
I am always happy to see annotation deps promoted from Our dependency on Line 53 in 0b4fd6a
...may well just predate our current advice to use annotationProcessorPaths plus a dep on auto-service-annotations . (Maybe auto-service-annotations didn't even exist as a separate package back then?)
|
We also faced the same issue and had to set the annotation processor in Intellij to obtain processors from the project classpath whenever we want to run or debug. |
copybara-service bot
pushed a commit
that referenced
this issue
Apr 6, 2021
…rPaths>`. The annotation dependencies for `@AutoService` and for Error Prone are now regular compile-scoped dependencies. This prevents errors from overeager consumers that can't deal with missing annotation class files. The `<annotationProcessorPaths>` incantations are kind of clunky since we need a different path for building tests (which must include AutoValueProcessor) and for building AutoValue itself (which obviously can't). Fixes #1032. RELNOTES=n/a PiperOrigin-RevId: 367002319
copybara-service bot
pushed a commit
that referenced
this issue
Apr 6, 2021
…rPaths>`. The annotation dependencies for `@AutoService` and for Error Prone are now regular compile-scoped dependencies. This prevents errors from overeager consumers that can't deal with missing annotation class files. The `<annotationProcessorPaths>` incantations are kind of clunky since we need a different path for building tests (which must include AutoValueProcessor) and for building AutoValue itself (which obviously can't). Fixes #1032. RELNOTES=n/a PiperOrigin-RevId: 367002319
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Maven projects using AutoValue have to explicitly depend on AutoService as well in order to avoid errors when using IDEs like IntelliJ.
For example see https://github.com/googleapis/java-shared-config/blob/393ba5669675afb44740fdc45c8110feccf0b3b6/pom.xml#L773-L786.
Can we change AutoService's retention back to source? Alternatively, can we change AutoValue's dependency on AutoService to have the normal
compile
scope instead ofprovided
?The text was updated successfully, but these errors were encountered: