You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
not finding generated packages although they are working when using mvn cli #1552
I am having multi-module maven project where module B uses code generated during the build of module A using open-api generator. I have checked the jars, and the classes are actually correctly included. I have built and deployed the app, and all is working fine. Except for VSCode, which is always giving an error that the generated pacakge does not exist, although it was used in the code using autocompletion. So, autocomplete knows the pacakge is there, but not the syntax checker?
Extension version: 0.30.5
VS Code version: Code 1.108.2 (c9d77990917f3102ada88be140d28b038d1dd7c7, 2026-01-21T13:52:09.270Z)
OS version: Windows_NT x64 10.0.22631
Modes:
System Info
Item
Value
CPUs
Intel Xeon Processor (Skylake, IBRS, no TSX) (4 x 2494)
Hi Ahmad Hamdan (@hamdan-ahmad-lb), I'm an AI Support assistant here to help with your issue. While the team reviews your request, I wanted to provide some possible tips and documentation that might help you in the meantime.
Solution
Make sure your OpenAPI Generator runs in the generate-sources phase and writes into target/generated-sources:
The team will respond to your issue shortly. I hope these suggestions are helpful in the meantime. If this comment helped you, please give it a 👍. If the suggestion was not helpful or incorrect, please give it a 👎. Your feedback helps us improve!
This issue has been closed automatically because it needs more information and has not had recent activity. Please reach out if you have or find the answers we need so that we can investigate further.
Activity
github-actions commentedon Jan 27, 2026
Hi Ahmad Hamdan (@hamdan-ahmad-lb), I'm an AI Support assistant here to help with your issue. While the team reviews your request, I wanted to provide some possible tips and documentation that might help you in the meantime.
Solution
Make sure your OpenAPI Generator runs in the generate-sources phase and writes into
target/generated-sources:Add the generated-sources directory to your Maven project so VS Code’s Java extension picks it up. For example, in module A’s
pom.xml:Ref: “Generated classes not added to classpath” issue → Generated classes not added to classpath redhat-developer/vscode-java#1725
After a full Maven build, refresh the workspace so the language server re-indexes:
Labels
Other references with low confidence
./mvnw clean package, generated sources re-recognized but missing deps• VS Code’s Java plugin spots new files under
target/generated-sourcesbut doesn’t add module classpath → you see “cannot be resolved” until you recompile or reopen. No concrete fix in this thread, but confirms the same root cause.URL: After
./mvnw clean package, the java file generated in the output directorytargetis re-identified as a project file by thevscode-javaplugin. redhat-developer/vscode-java#3838The team will respond to your issue shortly. I hope these suggestions are helpful in the meantime. If this comment helped you, please give it a 👍. If the suggestion was not helpful or incorrect, please give it a 👎. Your feedback helps us improve!
github-actions commentedon Feb 20, 2026
This issue has been closed automatically because it needs more information and has not had recent activity. Please reach out if you have or find the answers we need so that we can investigate further.