maven compilation failure

前端 未结 18 2196
不知归路
不知归路 2020-12-07 17:57

I have a weird problem - Some class file couldn\'t be read during maven build.

  1. I have a project A and project B.
  2. Project
18条回答
  •  既然无缘
    2020-12-07 18:20

    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.

提交回复
热议问题