Ant build produces "package does not exist" errors, though intellij java compiler is fine
Hi,
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
Please sign in to leave a comment.
>I've ensured the correct dependencies are in place for that module, in project structure dialog.
You need to ensure that the classpath, that is configured in and xml configuration file correctly contains these dependencies for which you have package missing reports. See examples in Ant documentation about populating the classpath.
Ah, excellent. This fixes the issue, thank you