Building Spring From the Source - No Fluff Just Stuff

Building Spring From the Source

Posted by: Craig Walls on September 29, 2008

As you've no doubt heard and as I've already commented on elsewhere on this blog, SpringSource has enacted a new maintenance policy around Spring that limits maintenance release builds to within a 3 month window following a major release. I've already voiced my opinion on this new policy elsewhere and it hasn't changed substantially, so I won't bother restating it today.

But, as a service to those of you who may want to get around the maintenance policy restrictions and build Spring for yourself (and as a reminder to me of how to do the same thing), here are the steps I take to build Spring from the project root in CVS.

First, check Spring out of CVS (Note that the command lines wrap to fit on this page. The backslash on the first and third lines indicate a line wrap and should not be typed):

% cvs -d:pserver:anonymous@springframework.cvs.sourceforge.net: \
                                             /cvsroot/springframework login
% cvs -z3 -d:pserver:anonymous@springframework.cvs.sourceforge.net: \
                                             /cvsroot/springframework co -P spring

Next, make sure that your JAVA_HOME variable is pointing to a Java 1.6 home directory. On my MacBook Pro, it looks like this (it may/probably-will be different on your machine):

% cd spring
spring% setenv JAVA_HOME /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home

Finally, you can build the Spring JAR files by using Ant:

spring% ant alljars

If everything goes well (and it usually does for me), then you'll find the Spring JAR files waiting for you in the dist directory. Enjoy.

Craig Walls

About Craig Walls

Craig Walls is a Principal Engineer, Java Champion, Alexa Champion, and the author of Spring AI in Action, Spring in Action, and Build Talking Apps. He's a zealous promoter of the Spring Framework, speaking frequently at local user groups and conferences and writing about Spring. When he's not slinging code, Craig is planning his next trip to Disney World or Disneyland and spending as much time as he can with his wife, two daughters, 1 bird and 2 dogs.

Why Attend the NFJS Tour?

  • » Cutting-Edge Technologies
  • » Agile Practices
  • » Peer Exchange

Current Topics:

  • Languages on the JVM: Scala, Groovy, Clojure
  • Enterprise Java
  • Core Java, Java 8
  • Agility
  • Testing: Geb, Spock, Easyb
  • REST
  • NoSQL: MongoDB, Cassandra
  • Hadoop
  • Spring 4
  • Cloud
  • Automation Tools: Gradle, Git, Jenkins, Sonar
  • HTML5, CSS3, AngularJS, jQuery, Usability
  • Mobile Apps - iPhone and Android
  • More...
Learn More »