redhat-developer / redhat-developer/vscode-java

annotationProcessorPaths not firing during compile

Open
#1,120 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

codegen
Dominant language
TypeScript
Stars
2.3k
Forks
546
Avg merge
20h 1m
Merged PRs (30d)
11

Description

I have a pom.xml that uses annotationProcessorPaths on the maven-compiler-plugin to process annotations. During a standard maven compile the annotations are properly processed, but not during a vs-code build (auto, or forced full/incremental)

Environment
  • Operating System: MacOS Mojave
  • JDK version: openjdk 12 2019-03-19
  • Visual Studio Code version: 1.39.2
  • Java extension version: 0.52.0
Steps To Reproduce
  1. create a maven project using micronaut (or use the attached pom.xml) mn create-app -b maven test-vscode
  2. create a class test.vscode.Bean as
package test.vscode;

import javax.inject.Singleton;

@Singleton
public class Bean {


}
  1. Force a build

[attach a sample project reproducing the error]
attach logs

Current Result
$ ll target/classes/test/vscode
total 16
-rw-r--r--  1 bangroot  staff   600B Oct 24 13:19 Application.class
-rw-r--r--  1 bangroot  staff   328B Oct 24 13:19 Bean.class
Expected Result
$ ll target/classes/test/vscode
total 40
-rw-r--r--  1 bangroot  staff   1.9K Oct 24 13:20 $BeanDefinition.class
-rw-r--r--  1 bangroot  staff   743B Oct 24 13:20 $BeanDefinitionClass$$AnnotationMetadata.class
-rw-r--r--  1 bangroot  staff   862B Oct 24 13:20 $BeanDefinitionClass.class
-rw-r--r--  1 bangroot  staff   600B Oct 24 13:20 Application.class
-rw-r--r--  1 bangroot  staff   328B Oct 24 13:20 Bean.class
Additional Informations

I did notice that there is no .factorypath file getting generated like happens on my spring-boot projects.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the attached sample Maven project and logs, then compare the standard maven compile with the VS Code auto, full, and incremental builds. Investigate how annotationProcessorPaths from pom.xml are handled and whether the .factorypath is generated. Done means the VS Code build produces the expected generated Micronaut classes.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, vscode
Domain
build-system, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.