Java Setup

This page outlines how to setup a decent working environment to rapidly develop Java applications. All the technologies outlined are free, industry standard and readily available.

My primary Java stack is built around the following: Maven for dependency & build management; Spring for application architecture, lifecycle & dependency injection; and SpringSource Tool Suite (STS) for an integrated development environment.  Even better, STS ships with everything you need in-the-box, so start by downloading it here.

When you first Open STS, you’ll see the Dashboard. There’s generally some good SpringSource related information there, but nothing you need to pay attention to immediately. You’ll also probably notice that the setup is very similar to the Eclipse IDE environment, which makes sense as STS is built upon the Eclipse runtime. STS also ships with the Maven m2eclipse plugin, meaning you can start creating projects from Maven archetypes immediately.

As of June 2012, I’ve started publishing archetypes for my most common setups in the public repository made available by Sonatype Open Source Software Repository Hosting (OSSRH), making it easy for others to setup projects similar to mine. To start using these archetypes, you need to point STS to the repository at https://oss.sonatype.org/content/groups/public/ by doing the following:

  1. Load the STS preferences, located under Window > Preferences (or ‘Preferences’ under the main application menu in OS X)
  2. Navigating to Maven > Archetypes
  3. Selecting Add Remote Catalog…
    1. Set the Catalog File field to https://oss.sonatype.org/content/groups/public/
    2. Set the Description field to something appropriate, like ‘Sonatype OSSRH’
    3. Select Verify and make sure that a large number of archetypes are found (1,500+ as of this writing)
Next time you create a new Maven Project from Archetype, you should have the new repo available. I’m planning on releasing my archetypes under the co.ntier namespace (as it’s the shortest domain I could find).

 

UPDATE: I’ve figured out how to host my archetypes / projects on GitHub and integrate that repository into my development flow. I’ll be updating this page shortly, but to use my archetypes you’ll want to add my (raw) GitHub repository at https://raw.github.com/dwelch2344/maven-repo/master/releases/ (catalog file)