Skip to end of metadata
Go to start of metadata

The simplest way to get started with developing with the Taverna workbench source code is to check out the runtime module.

This is a very lightweight project that only contains the skeleton to create the application of the Taverna workbench, such as the shell scripts and plugin definitions. The rest of the modules will be downloaded from the Maven snapshot repository, where they have been compiled and deployed by the automatic build system, however you can additionally check out any of those modules, and use your modified version instead.

Let's show this as a step-by-step example. First, we'll assume you have all the prerequisites installed, so let's start by adding Taverna's Subversion repositoryto Eclipse.

In Eclipse, click Window -> Open Perspective -> Other....

Select SVN Repository Exploring

Right click inside the SVN Repositories panel on the left and select  New -> Repository Location...

Type the Taverna Subversion repository location into the URL field:

http://taverna.googlecode.com/svn/taverna/

Developer Access

If you are one of the Taverna developers with write access to the repository - use https instead of http as the protocol. For example:

https://taverna.googlecode.com/svn/taverna/

Your username would be the Google account username as used for signing in to Google Code, for example fred@mygrid.org.uk - while your password will be an auto-generated one that you can retrieve from your Google Code settings. See the article about Subversion repositoryfor details on write access.

Before we do a check-out, we'll configure Maven to use myGrid's mirror of the main Maven repository. This is where Maven downloads dependencies like log4j and axis, and although there are several official mirrors, you might get a speed-up of the initial check-out if you use myGrid's mirror. myGrid's mirror is updated nightly, and is available at http://www.mygrid.org.uk/maven/repo1 . To make Maven use this, from the Eclipse menu click Preferences..., then go to Maven -> Installations. From there, click on the hyperlink User Settings - which should open an XML editor in the background. Click OK to close the dialogue.

Click on the "Source" tab of the editor, and paste in something like:

If you already have a .m2/settings.xml file, insert the <mirrors> section into the existing file, right below <settings>.

When saving this XML file you will have to navigate to the subdirectory .m2 in your home directory (it should already have been created for you), and call the file settings.xml. (If you are using OSX this folder will be hidden - you can press Shift Command G to get the Go to folder pop-up, where you can type in .m2). 

For the first compilation of the Taverna source code on your machine, Maven will have to download various myGrid and third-party dependencies from Maven repositories. Although the total of these should be about 100 MB, this can (even on a good connection) take from 15 to 45 minutes the first time due to the many HTTP requests Maven would have to perform. To give you a head start, you should download the latest nightly snapshot of Taverna, and copy it's repository folder to your .m2 folder.

Let's assume you have downloaded and unzipped taverna-nightly-2.1-SNAPSHOT-20090309-bin.zip. Navigate to your .m2 folder in your home directory, then copy the repository folder from your unzipped nightly Taverna. Overwrite any changes.
 
In OS X you might need to use Shift-Command-G to open the Go to the folder dialogue. In Linux you might have to enable showing of hidden files. In Windows the .m2 folder should be in your home directory, which is the one that owns the Desktop
 
 
 

 
 
You should now be ready to browse Taverna's source code repository and do a checkout. We won't go into details about the structure of the subversion repository here, but we'll browse down to products/net.sf.taverna.t2.taverna-workbench/trunk.

Right click on trunk (otherwise you will check out all tags and branches as well!), right click and select Check out as Maven project....

Don't have Check out as Maven project?

If you don't have this option in the menu, you probably didn't install the prerequisite Subversive Integration for the M2Eclipse Project. If this is the case you could instead select Check out and after check out, right click on the project, select Import... and select Maven project. Browse and select the checked out project top folder, this should then give you the a dialogue similar to the one below.

This should bring up the Checkout as Maven project from SCM dialogue box. Click Advanced and make sure both Resolve workspace projects and Separate projects for modules have been ticked. The last check-box means that each sub-module, as you see above that would be workbench-distro, workbench-dev, etc, will be checked out as individual projects in Eclipse. This is highly recommended for the Taverna workbench due to various dependencies used from within each module.

We've found it useful to use more qualified project names. The default is to use the so-called artifactID for each project, which means that you would get projects called workbench-distro, workbench-dev, etc. However, once you start checking out other modules as well, this can make it difficult to see the organisation between the different modules as you would in effect get a flat structure. One way around this which we'll use, is to in the import dialogue select the Name template and select [groupId].[artifactId]. If this option is not available, type it in manually.


 
To group together these sub-projects, we'll use an Eclipse feature called Working sets. Click Next, where we'll tick the box for Add project to working set.  Click New..., select Java, and give the working set a name like net.sf.taverna.t2.taverna-workbench (or simply taverna-workbench). Do not add any of the existing Workspace content in this dialogue box (unless you are using the Import... route instead of the Checkout... route.)


 
Double-check that the Advanced tick-boxes and the Name template are still as in the previous screen and click Finish.

While Eclipse is Importing Maven projects, go to the Java perspective and in the Package Explorer, you should see some projects popping up. To show the hierarchy of working sets we talked about, you would need to click on the little triangle and select Top Level Elements -> Working Sets.

 
If you do this for the first time, a pop-up will ask you for which working sets to include. If you don't get this, go to the menu again and click Select Working Set...
 
Make sure the working set you just added has been ticked. Other Projects can also be useful as it is a magic working set that include all other projects not currently shown in a working set. (So if you hide another working sets by unchecking it, projects from that working set would then appear in Other Projects).
 

 
There will be quite a few Maven dependencies that needs to be downloaded if this is the first time you work with Taverna. Unfortunately this can take some time, from 5 minutes up to 45 minutes, in which your Eclipse might become unresponsive. If you want to inspect the outputs from Maven, click in the menu Window -> Show View -> Console. Click on the little plus-icon on the top-right to select Maven console.
 

  

Once this runs into completion your new projects should be available from the new working set. We'll show you two ways to run the Taverna workbench as a developer.

The first is the quick-and-dirty way of running with all the modules bundled into a single classloader. This way of starting the workbench is fairly quick (no splashscreen), and is practical for testing out UI improvements. However, this way of running Taverna does not use our plugin mechanism (Raven), and you should not rely on building, running or particularly save any workflows when running the workbench in this manner. (The reason is that part of the workflow definition is to indicate from which plugin the activity implementation came from, which in this case would be blank).

Find the module net.sf.taverna.t2.taverna-workbench.workbench-dev. Open it's Maven dependencies library folder and make sure there's loads of libraries listed, 30 or more.

Right click on the project and select Run -> Application. After a tiny while a dialogue should pop up with possible main() classes to invoke - select Prelauncher.

This should start the workbench. As above, note that you should not save any workflows created from running them in this workbench - as they can't be opened in the normal distributed workbench. Also translation of Taverna 1 workflows are disabled in this version as that would pull in too many libraries.

The other alternative is to run the {{net.sf.taverna.t2.taverna-workbench.workbench-distro}} project from the command line. This is the project that is used to build the nightly snapshot. When you run mvn install on this project, it will generate a directory very similar to the distribution of Taverna, within the target subdirectory (it will be a directory like taverna-dev-2.1-beta-3-SNAPSHOT-20090918T1401-dev.dir), from where you can run run.sh or run.bat.

When running this normally it will create a developer build that assumes all Taverna libraries have already been installed by Maven to your $HOME/.m2/repository. The advantage of this is that you the build of workbench-distro don't need to create the repository folder (which can take 2-5 minutes), and that you don't need to rebuild workbench-distro if you have changed a module - all you need to do is a mvn clean install of that module and to re-run the workbench.

The workbench-distro POM file should have test-dependencies on the main plugins so that all the required JAR files should be downloaded to your $HOME/.m2/repository on the first installation. This would include any fresh nightly snapshots, typically for modules you have not checked out.

Labels
  • None
  1. 2009-03-11

    I did everything it said but was then none the wiser as to what to do next (sad)