The generated source files in thirft/target/generated-sources and antlr/target/generated-sources can't be auto discovered by IDEs like VSCode and IntelliJ IDEA.
In IDEA, we can solve this by following the instructions in https://iotdb.apache.org/Development/ContributeGuide.html#_2-iotdb-debugging-method.
However, this can't be applied in VSCode Java plugin because adding a folder to Java source path is forbidden in a maven project. The error output is Unsupported operation. Please use pom.xml file to manage the source directories of maven project.
Use build-helper-maven-plugin to add the folder to sources in generate-sources phase.
If this PR is accepted, I will submit another one to update the docs.
We must use
The resaons are:
1. Although the two paths refer to the same dictionary, their string representations are different. e.g. antlr/target/classes/../generated-sources/antlr4 and antlr/target/generated-sources/antlr4.
2. It seems that javac of JDK8 will not simplify the source path, thus a duplicate class compilcation error occurs.
3. JDK11 and 15 fixed this issue(I guess).
See this CI result: https://github.com/apache/iotdb/actions/runs/635878512