I have a Maven project with 17 modules that I'm editing using IntelliJ 2020.2. It uses the bundled Maven version 3.6.3.
If I ask IntelliJ to run Junit tests in each module they compile and pass without a problem.
But when I run the compile, install, or deploy Maven lifecycle task in the root pom the modules fail to compile:
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:testCompile (default-testCompile) on project qq-dtc-properties: Fatal error compiling
If I add debug flags and re-run the Maven task I don't see any errors or new information.
Why would IntelliJ successfully build and run test cases but Maven fail?
Here's the really weird part.
If I run the root compile task it fails once, twice, but succeeds on the third try. I had to repeat that for each module. It's like a partridge in a pear tree: I build that first module 3*17 = 51 times.
I'm mystified about Maven't behavior. Has anyone else seen something like this?