Skip to content

Enable annotation processing #339

@bikingcoder

Description

@bikingcoder

Hi, I'm trying to use https://github.com/immutables/immutables which is an annotation based source code generator.

In the docs (https://immutables.github.io/apt.html), it's mentioned that the m2e-apt Eclipse plugin needs to be configured when building in Eclipse, so presumably this is why in vscode it doesn't work?

I was previously having problems with Rocker templates, and with hindsight this might have been related.

Environment
  • Operating System: xubuntu yakkety
  • JDK version: 1.8.0_131-b11
  • Visual Studio Code version: 1.17.1
  • Java extension version: 0.12.0
  • Maven 3.5
  • Maven compiler plugin 3.6
Steps To Reproduce

https://immutables.github.io/getstarted.html

  1. Set up a Maven project that includes the org.immutables dependency
  2. Add a test class that uses the @Value.Immutable annotation
  3. vs-code-java fails to generate the source code, but a mvn compile will
Current Result

No generated source code for @Value.Immutable annotated class

Expected Result

Corresponding Immutable... class source code generated

Additional Informations

I tried adding org.jboss.tools.maven.apt.core_1.3.0.201610261805 to the extension's server/plugins folder to see if that allowed the annotation processor to be picked up, but it wasn't effective. I also tried putting the Immutables jar in the annotationProcessorPaths element in the maven compile plugin configuration, but it still wasn't picked up.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions