Tag Archives: How-To

Plexus Container Five Minute Tutorial


May 21, 2009 By Brian Demers

The goal of this blog is to show an updated and more involved example then what is currently located on the plexus site.  This will cover creating a couple of components and explain the different ways to inject your dependencies. This example assumes you are using maven 2 to make your life easier.

Continue reading

Why Putting Repositories in your POMs is a Bad Idea


February 25, 2009 By Brian Fox

I get this question frequently so it is time to write down my thoughts on the answer so I can stop repeating myself. Here’s the question:

Should I put the urls to my repositories in my poms or in my settings?

The short answer is: settings.

The long answer is: it depends.

There are two scenarios to consider here. Enterprise software (generally not published externally) and public software. Lets take Enterprise software first. Continue reading this post for a full explanation of both scenarios. Continue reading

Best Practices for releasing with 3rd party SNAPSHOT dependencies


January 26, 2009 By Brian Fox

The Maven Release plugin enforces best practices for releasing Maven artifacts. In summary, the release plugin performs the following steps:

  1. Validate no local changes against your SCM
  2. Validate that there are no SNAPSHOT dependencies
  3. Convert the modules to the to-be released version
  4. Ensure the build and Unit/Integration tests succeed
  5. Commit the changes to SCM, then Tag the release
  6. Checkout the tag to a clean location and build/deploy the artifacts

Dealing with failures on Step #2 is where I want to focus today. Continue reading

Maven Continuous Integration Best Practices


January 15, 2009 By Brian Fox

Continuous Integration is a development best practice that you need to be using in your process; it is an essential part of an efficient Software Development Lifecycle (SLDC).   If you aren’t using it already, then you should start, now.   The main benefit of Continuous Integration is the ability to flag errors as they are introduced into a system instead of waiting multiple days for test failures and critical errors to be identified during the QA cycle.  This post isn’t about the virtues of using CI, it’s about how to setup an optimal environment in a Maven shop. Here are seven tips for running Maven builds in a CI system such as Hudson. Continue reading