Troubleshooting: When It Just Won't Work


October 22, 2008 By Tim O'Brien

Last week there was a question on the Neo4J dev list about troubleshooting a Maven build. I responded with a quick list of things to check.

  1. What version of Maven are you running? If it isn’t at least Maven 2.0.9, you need to upgrade. Maven 2.0.9 was the first version to set the core plugin versions, you should be running at least 2.0.9. This is important because, prior to 2.0.9, Maven would download the latest version of a core plugin like the compiler plugin or the jar plugin.    If you haven’t upgraded since Maven 2.0.9, upgrade.
  2. Clear out the local repository on the machine in question, check the update policy for your snapshots.
  3. Use:
    • mvn help:effective-pom
    • mvn help:effective-settings
    • mvn help:active-profiles

    These commands will interpolate all of the various settings files and poms to show you if there are any effective differences.   Maybe someone did a custom config in ~/.m2/settings.xml or in M2_HOME/conf/settings.xml.    (More info here: http://www.sonatype.com/book/reference/installation.html#d0e1172)

  4. Are you hitting the public repository?   Are the two machines hitting difference repositories?    If you are not running Nexus, I’d suggest that you download it and run it, it will give you insight into your repo and a target to which you can deploy artifacts.