« Maven Facts

April 16, 2009 • ☕️ 1 min read

  1. Maven will never tell you which phases or goals are available in the pom, you have to guess or check the on-line documentation
  2. Maven by default uses text files to dump the test execution results, if you want to see what’s happening on the console you have to call it with -Dsurefire.useFile=false
  3. Maven can skip the executions of the tests (sometimes might be useful!) call it with -Dmaven.test.skip=true
  4. Maven knows what inheritance is (and therefore claims that it’s object oriented… grrr…) so if you can’t find where some property is defined have a look up on the parent
  5. Maven is based on XML but you won’t write as much XML as with Ant
  6. Maven can create Eclipse project files and even download the sources for you (mvn eclipse:eclipse -DdownloadSources=true)
  7. Maven downloads stuff from the internet (#1 failure reason for 99% Maven presentations) but can be run in offline mode (if you had a sucessfull install previously), try mvn -o
  8. Maven uses repositories, but since not all the libs in the world are in repositories you should setup a local repository (Archiva works well)
  9. Maven uses repositories, but since you don’t want to hog all your company bandwith you should setup a local repository
  10. Maven goes great with stuff like Hudson, Sonar
  11. Maven build profiles are really cool
  12. Maven is not silver bullet but I’ll never go back to Ant