The steps to add the Oracle JDBC Drivers to your local Maven repository can be found here:
Here I am recording them for me just in case that entry goes away:
Find the oralce jdbc jar in your oracle client software. If you do not have the Oracle Client, install it.
cd to the directory where the oracle client jar is located. In my case: C:\ORA10gClient\jdbc\lib
Install the jar by typing the following maven command:
mvn install:install-file -Dfile=ojdbc14_g.jar -DgroupId=com.oracle \ -DartifactId=oracle -Dversion=10.2.0.1.0 -Dpackaging=jar -DgeneratePom=true
Add the following dependency to your project’s pom.xml
com.oracle oracle 10.2.0.1.0
An Integrated Development Environment (IDE ) is pretty much useless if it does not have integration with a version control system. It is not very agile to have to check out the code to a directory an then manually import it into the IDE of choice. SubEclipse is an Eclipse plugin that will allow SVN (a.k.a Subversion) interaction(check out, check in, versions compare, etc…) straight up from the IDE itself.
Steps to install Subeclipse are as follows:
- Fire up your IDE of choice STS (an Eclipse bundle) or Eclipse.
- Click on “Help/Install New Software…”
- Click the “Add…” button.
- Give a name to the site, I put “Subeclipse” , paste the latest Eclipse update site URL from the Subclipse download project page and then press “OK”
- Select all of the components on the next screen as follows:
- Follow the installation wizard, accept the terms of the license agreement, and press the “Finish” button
- Restart your STS or Eclipse IDE that you have chosen
- You should now be able to check out projects from SVN. Click on “New/Other…”. Scroll down until you see a folder called SVN, clicking on “Checkout Projects from SVN” will start the wizard.
In my next post under Development Environment/IDE series I will show you how to check out Java and Groovy projects from SVN.
The set up
In order to be able compile and run java, groovy, and grails applications from the command line you will need to add the path to the binaries to the Environment variables (Right click on “My Computer” icon, click on the “Advanced” tab, the “Environment Variables” button should be at the bottom.
- Install JDK 1.6
- Download latest JDK from http://java.sun.com
- Create a JAVA_HOME system environment variable
- Append ;%JAVA_HOME%\bin; to the Path environment variable
- Install latest Groovy
- Download the latest groovy from http://groovy.codehaus.org/Download
- Create a GROOVY_HOME system environment variable
- Append ;%GROOVY_HOME%\bin; to the Path environment variable
- Install Grails
- Download the latest grails from http://www.grails.org/Download
- Create a GRAILS_HOME system environment variable
- Append ;%GRAILS_HOME%\bin; to the Path environment variable
The environment variables set up should look like this (Replace the Value accordingly based on the location of your install).
The Path in your system environment variables as well should look as follows:
Note: You can copy paste this and append it at the end of your Path variable, be very careful and do not delete any existing entries unless you know what you are doing
Open up a command prompt and type the commands below.
- java -version
- groovy -v
- grails -version
If you installed all three components correctly, you should see something very similar to this screen shot.
In this tutorial I will demonstrate how to set up the Spring source ToolSuite to support Groovy and Grails development. Do as follows:
- Install the latest JDK, the latest Groovy SDK, and Grails.
- Install Springsource Tool Suite (STS) from http://www.springsource.com/developer/sts
- Find the STS.exe from wherever you unzipped the download ,I would recommend putting it straight under C:\ for quick navigation from the command prompt.
- Once STS is open, Click on “Help/Dashboard” menu item.
- Click on the “Extensions” tab at the bottom.
- Check the the Groovy Eclipse extension, click the “Install” button and follow the installation wizard. Restart STS after it’s done.
- Go back into the “Extensions” tab and check the Grails Support extension, click the “Install” button and follow the installation wizard. Restart STS after it’s done.
- You should be able to create grails projects now either from the “New Project” icon on the top left or from the “Dashboard” screen
Note #1: Keep going to the “Extensions” tab every once in a while to see if the Sprinsource team has added new features to these plugins.
Note #2: If your company is buying into the Groovy & Grails movement try to make them pay for an IntelliJ IDEA license, it’s $250 but it’s definitely worth it as it has native development environment support for Groovy, Grails, and Griffon applications.