Maven acting weird

Any Maven experts out there? We have a multiple module project, and when I build it each of the modules is successful - indeed the whole build is successful. But then when I try to use the artefacts created (I use Intellij) I get endless compilation errors while it tells me that various classes in different modules don't exist. I wouldn't mind, but it specifically seems to be complaining about test classes, yet all of the tests pass just fine when I do a complete build. Anyone got any ideas?

Answers

  • Can you post your pom and the corresponding .iml file for one of the modules that IntelliJ claims to have compile errors?
  • I've seen something like what you describe when the classpath information in the .iml files that IntelliJ uses is not set correctly. It might be worth trying to re-import your project.