The problem stated in the title only occurs with one module in my project. When I build this module, it compiles fine and runs fine using run configurations in intellij. The problem occurs when I build my project with ant. The java compiler starts compiling the modules and when it reaches this specific module, it throws package not found errors for various imports in the java classes of that module.
I've checked which JDK ant is using, and ensured its the same as intellij. I've ensured the correct dependencies are in place for that module, in project structure dialog. I've tried invalidate caches and restart but also to no avail. I've also tried running from the command line but the exact same thing happens.
If anyone could give any direction that would be really helpful