I've ran into an issue with Maven a few times now where the build does not fail if there's an inconsistency between the package declaration and the path of the source file. From other Stackoverflow questions, there are several examples that shows Eclipse catches this type of error no problem and explains why Maven doesn't:
Eclipse says package declaration does not match expected package "" Eclipse: The declared package does not match the expected package Maven + Java package declaration
There are a few different issue that can arise when Maven doesn't catch this inconsistency including run-time failures to load classes or unit tests omitted from a build without flagging any errors.
Although Maven doesn't catch this with the compiler, is there any Maven plugin out there that will validate the package name to the source path? Or possibly some other configuration value that can be set in the pom.xml or settings.xml to get Maven to verify these are consistent?