I have a weird problem - Some class file couldn\'t be read during maven build.
A
and project B
.
It's easy to get this error in a multi-module project. If, for example, you made changes to modules A, B, and C, but then you try to compile just module B, you are susceptible to this error. Say module B has a dependency on module A. Since only module B was compiled, the class files from module A are now out of date and possibly invalid.
Compiling all the modules (or modules in the proper hierarchical dependency order) resolves this error, if this is the nature of your problem.