Maven Facts

  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

What's really agile?

Today we ended a scrum sprint, two weeks long. In two weeks a team of five developers managed to setup a project using state of art tecnologies such as DRW, ActiveMQ, ServiceMix, Hibernate, Spring, Atomikos XA Transactions. Not only we have a use case up and running and we are able to show case it to the customer. Now,  few choices in my opinion made this "more agile". - The usage of Maven, we have probably 50 dependencies, I can't imagine how to handle this with ant. - The usage of Hudson as CI tool, simple UI, no need to read the manual - The usage of Spring, in a couple of hours we had all we need (DAOs, JMS senders and receivers especially) - The usage of Hibernate3 with annotations, can't be faster to write down your domain - The usage of Jetty to have a fast feedback locally - Well, ovious maybe but worth mention, we wrote tests first, we used Junit4.5 - Flexible pair programming, we paired only when in trouble or when we felt the solution was mature enough to be showcased and shared in the team - Focused work, one developer on the Web UI, one on the deployment, one on the ServiceMix/ActiveMQ, one on the Transactions + Design of the system I call this agile, hard work and good fun.

Mavenized

It's almost two months now that I use Maven every day, I have to say that it helped me a lot, I'm much more productive.  There are, indeed things that I don't like and problems but the dependency management is really sweet, the project setup too, with the archetypes.  Some good links to start if you're still not mavenized:  I still get annoyed sometimes, with the xml, with some weird repositories publishing strange versions, or just with Log4J for example, depending on libraries not available on any repository, but hey, Maven downloaded for me, only once, only in one place hundreds of jar, I'll really never do that job again by myself.