If you want to work with the source code or libraries of Taverna, we recommend you first make sure you have these prerequisites installed:
You don't actually need Eclipse, it also works fine to use Netbeans with Maven support, or if you are patient enough, just the Maven
mvn command line and a standalone editor.
However, as the Taverna code base contains many modules, an IDE such as Eclipse or Netbeans makes it a lot easier to navigate between classes, and the Maven support handles nested modules, dependency download and assembling the classpath for you. For a project depending on Taverna code we always recommend using Maven 3 to handle the dependencies. This should also make it easy to later depend on a later version of our code base.
Java SE Development Kit (SDK)
To compile Java source code you should make sure you have Sun's Java SE Development Kit (SDK) installed. Taverna code requires Java 7. Note that although you might have the JRE installed (
java) you will need the SDK to get the compiler
For Windows you would need to download and install the Java SE Development Kit, for instance "JDK 7 Update 55" (or later). You might then have to modify your
PATH to be able to run
java on the command line - see My computer -> System properties -> Advanced -> Environment Variables or equivalent.
Mac OS X require a separate Java install as Java is no longer bundled with OS X. You will need to download and install the Java SE Development Kit, for instance "JDK 7 Update 55". Open a Terminal and verify your Java version using
Many Linux distributions allow you to install Java through their package manager, e.g.
apt-get install openjdk-7-jdk
yum install java-1.7.0-openjdk-devel
Note that your Linux might already have an alternative open Java implementation like IcedTea, GCJ or OpenJDK 6 installed - these have unfortunately not proven to be stable enough to be used for graphical software like Eclipse and the Taverna workbench. OpenJDK 7 or Oracle's JDK 7 is recommended.
If you experience weird problems - check on the command line with
java -version that you are using OpenJDK or Oracle's Java 7 (in Ubuntu you can use
update-java-alternatives to select which
java to have on your path).
Although Taverna itself is not based on and do not require any part of Eclipse platform, the myGrid developers mainly use Eclipse as their IDE. You can use any other IDE of course, but due to the mere size of our code base you will probably want to stick with something that supports Maven, like Eclipse or NetBeans.
Download and install Eclipse IDE for Java Developers for your platform, at the time of writing this the latest version is Kepler SR2 (4.3.2). You will need the edition for Java or Java EE. You will need to choose the 64-bit version if the command
java -version says your Java is 64-bit (e.g. if your machine has more than 2 GB of memory).
Note that some Linux distributions might come with a version of Eclipse in their package manager, but this seems most of the time to be a very outdated or stripped-down version (like 3.3) which we do not recommend.
|Running Eclipse using the right Java|
Note that if you are running Eclipse on Windows, you might get a problem with Maven if Eclipse is running using the JRE instead of the JDK, or in the worst case, a Windows bundled JRE. Edit your
One trick to make sure Eclipse actually picks up your
Afterwards, you might check from within Eclipse Preferences->Java->Installed JREs to ensure it uses the correct JDK - this is also important to do in Linux if you have alternative Java implementations like IcedTea or GCJ installed.
Maven Integration for Eclipse
|Maven integration included since Eclipse Indigo|
Eclipse Indigo and later releases include the Maven integration in the Eclipse Java/J2EE download, and so the m2eclipse plugin no longer need to be installed separately.
Taverna source code is built and structured using the tool Maven 2 (instead of say
make). Maven also takes care of retrieving and maintaining dependencies so we don't have to put various JARs in our source repository. Have a quick look at Maven's documentation if you are new to using Maven.
Do not use the outdated
plugin to import Taverna source code into Eclipse. This has been superseded by the built-in Maven integration for Eclipse plugin (m2eclipse).
- If you are developing a plugin or checking out the Taverna source code you should have all the required components.
- If you are comfortable with the command line, you might also want to install the Maven binaries, see below.
As the Maven integration for Eclipse comes bundled with the libraries for Maven 3.0 (or later), you generally do not need to install Maven separately, unless you want to use Maven from the command line or need to use an older version of Maven. If you use the Maven integration for Eclipse you can launch Maven from within Eclipse - this would not require the installation of Maven binaries.
However, if you do want the
mvn command line tool, download Maven 3.2.5 or later, and install it somewhere on your operating system. In short all you need to do is unpack the archive somewhere and put the
mvn binary on your
PATH - One way to do this on UNIX-like systems is to unpack it to
/usr/local/share and make a symlink from
/usr/local/bin/mvn pointing to
/usr/local/share/apache-maven-3.2.5/bin/mvn (or equivalent).
Some Linux distributions might come with Maven in their package repository. As long as this is version 3.0.5 (see below) or later it should probably work fine - but if you experience any problems try using the latest Maven release.
Configuring m2eclipse to use the installed Maven
You can configure Eclipse to use your installation of Maven instead of the bundled libraries. This can be worth a shot if the Maven installation from within Eclipse show weird behaviour. Go to Window -> Preferences and Maven -> Installations to configure the path to your extracted Maven installation.