I have an APIClient class autogenerated from an OpenAPI yml file. Compiling was successful but running the app throws exceptions "java: package com.google.gson.reflect does not exist" and "java: package okhttp3 does not exist". The pom file contains these two packages. The digitalform ords client used the same codes but worked fine. I compared these two pom files and there are no differences. why does it throw runtime errors?
Error message:
C:\jag\jag-rsbc-digital-forms-vips-integration-17\jag-vips-client\src\jag-vips-client\target\generated-sources\openapi\src\main\java\ca\bc\gov\open\jag\ordsvipsclient\api\DisclosureApi.java:25:31
java: package com.google.gson.reflect does not exist
C:\jag\jag-rsbc-digital-forms-vips-integration-17\jag-vips-client\src\jag-vips-client\target\generated-sources\openapi\src\main\java\ca\bc\gov\open\jag\ordsvipsclient\api\DisclosureApi.java:93:19
java: package okhttp3 does not exist
POM.xml
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.10.1</version>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>4.11.0</version>
</dependency>

after clone/rebuild the application, I got everything working now. Intellij is just weird.