Archive for June, 2011

Maven 3 Tutorial – Project Setup

June 11th, 2011
  • Overview
    • What is Maven?
    • Plugins
    • Why not Ant and Ivy?
    • But It Downloads the Internet
  • Getting Started
    • Install
    • What is a POM?
    • Convention over Configuration
    • New Project
  • Project Management
    • Parent POM
    • Local Maven Repository
    • Multiple Artifacts from a Single Source
    • Release Plugin
    • Aggregate POM
    • Dependency Management
    • Distribution Zip
  • Conclusions

Overview

What is Maven?

Maven is a software project management and comprehension tool that includes: build tools, dependency management, project reporting and much more.  I say “much more” because at the core Maven is a plugin execution framework.  There are plugins supported by the Maven project (http://maven.apache.org/plugins/index.html), plugins supported by Mojo Project (http://mojo.codehaus.org/plugins.html), and third party plugins.  If you can find or write a plugin, Maven can run it.
» Read more: Maven 3 Tutorial – Project Setup

Testing Spring Wiring

June 1st, 2011

Overview

Spring is an essential part of my technology stack. I cann’t image providing quality software that doesn’t leverage an IoC container. However, decoupling components requires some amount of configuration. Whether this is accomplished through annotations or XML, it’s fairly easy to mess up. Fixing these missing or incorrect configurations doesn’t take very long. The real question is how quickly can you identify these errors?

This question of how long, is a feedback loop question. Unfortunately many teams wait until they fire up the application server to see if their Spring context is wired correctly. This is too late.

One of our clients suffered from this very issue. Due to environmental constraints they could not run automated, in-container tests that would have identified misconfigured beans. After repeatedly committing stupid configuration mistakes, I decided that I would write a Spring wiring test. As I began to write this I encountered five problems.
» Read more: Testing Spring Wiring