redhat-developer / redhat-developer/vscode-java
annotationProcessorPaths not firing during compile
Nobody has claimed this yet.
- 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
- create a maven project using micronaut (or use the attached pom.xml)
mn create-app -b maven test-vscode - create a class
test.vscode.Beanas
package test.vscode;
import javax.inject.Singleton;
@Singleton
public class Bean {
}
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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