Troubleshooting: When It Just Won't Work

October 22, 2008 By Tim OBrien

1 minute read time

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. 

  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.

Tags: Sonatype Says

Written by Tim OBrien

Tim is a Software Architect with experience in all aspects of software development from project inception to developing scaleable production architectures for large-scale systems during critical, high-risk events such as Black Friday. He has helped many organizations ranging from small startups to Fortune 100 companies take a more strategic approach to adopting and evaluating technology and managing the risks associated with change.