Maven is adequate as a dependency resolution tool, though I always marvel at the insane number of packages it downloads.
That said it should not ever be used as a build system -- ant exist for exactly that reason or you could use Make if you want your builds to go faster.