maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From LevskiWeng <>
Subject Re: Why does Maven fail to compile my project occasionally?
Date Thu, 20 Feb 2014 01:58:13 GMT
Wayne Fay wrote
> Maven calls out to your system JDK to do the compilation step. With
> the [ERROR] lines you provided previously, Maven is simply passing
> along the error that was reported by javac. I bet, if you constructed
> the proper javac call (which can be seen in Maven's logs if you use -X
> for debug mode), you would see the same error produced without
> involving Maven (or Jenkins) at all.
> IIRC you had some "cannot find symbol" errors. What do you expect
> Maven to do about code defects reported by the Java compiler? Why are
> you blaming Maven for this?

After digging into the dependency tree described in each module's pom.xml
for several days, I found that you're right. It's my fault, not Maven's.
It's because my code depends some other modules which I didn't put it into
pom.xml explicitly. And I'm adding them into the corresponding pom.xml.
Thank you for directing me back to the right track!

However, I'm curious that I succeed to compile the project after several
compilation failure. How does it happen? I've passed the parameter 'clean
install -Dmaven.test.skip=true --update-snapshots --batch-mode --fail-fast
--debug -Dmaven.compiler.forceJavacCompilerUse=true
-Dmaven.compiler.verbose=true' to Maven, but it doesn't get the same error
when I compile the project the second time. And it mislead me to blame Maven

Could anyone explain the somewhat weird behavior of Maven? Thanks.

View this message in context:
Sent from the Maven - Users mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message