Table of Contents
Projects can be checked out directly from the Subversion repository located at http://svn.springbyexample.org/springindepth/ or using an IDE.
The projects were setup to checkout directly into Eclipse, but Maven can also be used to generate IntelliJ project files ('mvn idea:idea'). The project is also setup to use the Spring IDE.
Java 5 or higher installed with JAVA_HOME set.
Download and install to use Maven from the command line. Maven (version 2.x or higher).
Download and install the SpringSource Tool Suite Download. It's free, although registration is required, and simplifies the IDE setup. The SpringSource Tool Suite is based on the Eclipse IDE, but has all the SpringSource plugins installed as well as others like for AspectJ and Maven.
Install the Subversive (Subversion plugin) so projects can be checked out from the repository.
In the Available Software tab under 'Help/Software Updates...', add the following sites by clicking on the 'Add Site...' button.
Select all items from each update site except the JavaHL Win32 items if you're not on Windows from the Polarion site. For more information see Subversive Installation Instructions and Polarion's Subversive Download Info.
Click on the Install button, click on Next, accept the license, and then click on Finish.
Optional: SpringSource dm Server
To work with the SpringSource dm Server and the examples using it, you will need to install the SpringSource dm Server.
To use the SpringSource dm Server you will need to register with SpringSource before downloading from Download SpringSource dm Server.
Download and install Eclipse 3.4, preferably the Java EE release.
Install the Subversive Subversion Eclipse plugin (replacement for Subclipse for Eclipse 3.4) so the project can be checked out from the repository.
In the Available Software tab under 'Help/Software Updates...', add the following sites by clicking on the 'Add Site...' button.
Select all items from each update site except the JavaHL Win32 items if you're not on Windows from the Polarion site. For more information see Subversive Installation Instructions and Polarion's Subversive Download Info.
Click on the Install button, click on Next, accept the license, and then click on Finish.
Install the Spring IDE .
Adding the Spring IDE update site to Eclipse will also add the AspectJ AJDT update site. Select all of the Spring IDE items except the Dependency one (not for use with Eclipse 3.4) and all of the AJDT items.
Click on the Install button, click on Next, accept the license, and then click on Finish.
Install the M2Eclipse plugin developed by Sonatype for Maven support. It will allow easier management of Maven project files and also allow multi-module project support in the Eclipse IDE.
In the Available Software updates, add the update site from the bottom of http://m2eclipse.codehaus.org/.
Optional: SpringSource dm Server
To work with the SpringSource dm Server and the examples using it, you will need to install the SpringSource dm Server the SpringSource dm Server plugin for Eclipse. The plugin will let you define the server in Eclipse's server view, create projects to deploy to the server, and help manage bundle dependencies and downloads from the SpringSource Enterprise Bundle Repository.
Install the plugin from: http://static.springsource.com/projects/sts-dm-server/update/.
To use the SpringSource dm Server you will need to register with SpringSource before downloading from Download SpringSource dm Server.
Setup a Subversion repository pointing to http://svn.springbyexample.org/springindepth/.
Navigate to the projects trunk using the Subversion repository browser.
Right click on 'trunk', select 'Checkout...', click on the 'Finish' button.
Download and install a compliant Web Application Server (like Tomcat or the SpringSource dm Server).
Show Sever View
Window/Show View/Others...
Server/Servers
Right click in the Server View and select 'New/Server'.
Choose the installed server (for example Tomcat if that is the server you chose to install).
Right click on project and select 'Run As'/'Run on Server'.
Choose the server to run the project on.
Click on Next.
Click on Finish.
This should launch the application and also open up a browser window in Eclipse pointing to the webapps home page.
To use the SpringSource dm Server you will need to register with SpringSource before downloading from Download SpringSource dm Server.
Follow the instructions for installation after downloading either the binary release or the source and build the server yourself. If you're using the server plugin in the Eclipse IDE, you'll be able to start and stop the server inside Eclipse. Otherwise there are startup and shutdown scripts in the bin directory.
Note | |
---|---|
This setup is unnecessary when using M2Eclispe Plugin in the Eclipse IDE. The M2Eclilpse plugin will handle downloading any jars and Maven builds can be run inside the Eclipse IDE. Also the plugin can download source and javadoc jars as well as the plugin automatically handling the projects classpath using the dependencies from the pom.xml. |
From the command line (or the Maven Eclipse Plugin can be used) run 'mvn package' from the project directory at least once. This will download all the required jars.