Building Taverna from source code
The best way to build Taverna from source code is to fetch our latest version from CVS and build it using Maven.
Quick summary of the first time procedure:
- Install Java SDK 1.5 (if needed)
- Install CVS client (if needed)
- Install Maven 2.0.4 (the build system) http://maven.apache.org/download.html
- Fetch Taverna sourcecode from CVS
cvs -z3 -d:pserver:anonymous@taverna.cvs.sourceforge.net:/cvsroot/taverna co -P taverna1.0
- Build distribution directory of Taverna using Maven
mvn package assembly:directory
- Run Taverna from the new distribution
For subsequent updates:
- Update sourcecode from CVS
cvs update -P -d
- Follow step 5 and out
Note: This document is out of date. An updated version will appear later, as a quick fix, the magic needed for Taverna 1.5 is instead:
mvn install
rm -rf $HOME/.taverna/repository/
java -Draven.repository.0=file:///$HOME/.m2/repository/ -Xmx300m \
-Djava.system.class.loader=net.sf.taverna.tools.BootstrapClassLoader \
-jar taverna-bootstrap/target/taverna-bootstrap-1.5.1-SNAPSHOT.jar
This document will first show how to do this in Windows, and then on Linux. The differences is mainly in how to install the prerequisites. Note that the example outputs and "latest version" of prerequisites here could be outdated.
Note that our
ReleaseProcedure includes a few extra steps not covered here.
Windows
Install Sun Java Development Kit (JDK) 5.0
From
http://java.sun.com/j2se/1.5.0/download.jsp click
Download JDK 5.0 Update 10. (It might work with Java 6, but we have not tested this yet)
Select
Accept License Agreement and then choose the latest
Windows Online installation, at the time of writing this is
jdk-1_5_0_10-windows-i586-p-iftw.exe
Launch the downloaded
.exe file and follow the wizard to fully download and install the Java Development Kit. This could take a while, unfortunately.
Install Maven 2
From
http://maven.apache.org/download.html download the latest version, at the time of writing this is
maven-2.0.4-bin.zip.
From the zip folder, copy
maven-2.0.4 folder to
C:\Program Files and rename it to
maven2.
Then we'll set the
PATH so that we can run Maven from the command line:
- Right click My computer, select Properties (alternative:
Start->Settings->Control Panel->System)
- From the tab Advanced, click the button Environment variables.
- From System variables, select
PATH and click Edit. Add to the end, include the semicolon ;C:\Program Files\maven2\bin
This should make it possible to run maven from the command line. Do Start->Run and run
cmd so we can test this.
C:\Documents and Settings\stain>mvn -version
Maven version: 2.0.4
Check that the correct Java is installed as well (which it should if Maven worked):
C:\Documents and Settings\stain>java -version
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing)
If Maven failed and complained like this:
ERROR: JAVA_HOME not found in your environment.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation
This error message can occur if you have both the JRE (Java runtime) and JDK (development kit) installed at the same time. To resolve this, browse to
C:\Program Files\Java and look for
jdk1.5.0_10 or similar. Copy the whole path, say
C:\Program Files\Java\jdk1.5.0_10, and then from the previously mentioned
System variables, click for a
New System variable, named
JAVA_HOME, and paste that path as the value.
Maven mirrors
The default Maven mirrors can be quite unstable, unfortunately. We have found that using an alternate mirror can speed up the download and avoid the "Download failed.." errors. If you are lazy, you can try to rerun the
mvn commands until the downloads complete, but a better solution is to use a mirror repository.
The configuration directory for Maven is in your home directory, say
C:\Documents and Settings\stain and is named
.m2 - including the first dot. Make this directory if it is not already existing.
Use Notepad and create the file
.m2\settings.xml, and fill in:
<settings>
<mirrors>
<mirror>
<id>sunsite.dk</id>
<url>http://mirrors.sunsite.dk/maven2</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
</settings>
Make sure that Notepad does not save the file as
settings.xml.txt - as it sometimes has a tendency for. (Windows Explorer by default can even hide the
.txt extension for extra confusion)
HTTP proxy for Maven
If your network requires you to use a HTTP proxy, you can set up this for Maven as described in this
Maven guide
<settings>
...
...
<proxies>
<proxy>
<active>true</active>
<protocol>http</protocol>
<host>proxy.somewhere.com</host>
<port>8080</port>
<username>proxyuser</username>
<password>somepassword</password>
<nonProxyHosts>www.google.com|*.somewhere.com</nonProxyHosts>
</proxy>
</proxies>
</settings>
Note that you might later also need to modify the
runme.bat of Taverna to specify those proxy settings for Raven.
Install CVS and fetch source code
We'll need CVS to download the latest source code. We'll use TortoiseCVS in this tutorial, go to
http://www.tortoisecvs.org/ and download and install the latest stable version.
Then choose a folder where you want the Taverna source code to appear. In this example, we'll use
My documents. Right click somewhere in the folder and select
CVS Checkout. This will download the source code to a new subfolder.
Fill in details from
http://sourceforge.net/cvs/?group_id=74874, namely paste into the
CVSROOT field:
:pserver:anonymous@taverna.cvs.sourceforge.net:/cvsroot/taverna
For selecting the
Module, click the
Fetch list button, and then select
taverna1.0 from the drop-down list.
If clicking the Fetch list button fails, this could be because you are behind a firewall blocking outgoing pserver connection on port 2401. Contact your system administrator for help after checking the
Sourceforge status page for known downtimes.
After clicking
OK, source code will be downloaded, this could take a while, depending on your network connection.
In C:\Documents and Settings\stain\My Documents: "C:\Program Files\TortoiseCVS\cvs.exe" "-q" "checkout" "-P" "taverna1.0"
CVSROOT=:pserver:anonymous@taverna.cvs.sourceforge.net:/cvsroot/taverna
Empty password used - try 'cvs login' with a real password
U taverna1.0/assembly.xml
U taverna1.0/build.bat
(..)
U taverna1.0/workbench/examples/library/FetchPDBFlatFile.xml
U taverna1.0/workbench/examples/myGrid/split_with_GS_image.xml
Success, CVS operation completed
Compile Taverna sourcecode
In the command line, go to the checked out directory and run Maven, this will download all dependencies and compile Taverna and make the distribution directory.
C:\Documents and Settings\stain>cd "My Documents"
C:\Documents and Settings\stain\My Documents>cd taverna1.0
C:\Documents and Settings\stain\My Documents\taverna1.0>mvn package assembly:directory
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO] Taverna
[INFO] Raven
[INFO] Raven log4j support
[INFO] Taverna bootstrapper
[INFO] Taverna Core
[INFO] Baclava
[INFO] Baclava Core
[INFO] Baclava UI
[INFO] Baclava Store Implementations
[INFO] Scufl
(...)
[INFO] RServ Processor ....................................... SUCCESS [0.085s]
[INFO] SeqHound Processor .................................... SUCCESS [0.098s]
[INFO] SoapLab Processor ..................................... SUCCESS [0.107s]
[INFO] String Constant Processor ............................. SUCCESS [0.072s]
[INFO] Talisman Processor .................................... SUCCESS [0.087s]
[INFO] WSDL Processor ........................................ SUCCESS [0.183s]
[INFO] Zaria ................................................. SUCCESS [0.431s]
[INFO] Taverna Scavenger UI .................................. SUCCESS [0.210s]
[INFO] Taverna Update Manager ................................ SUCCESS [0.189s]
[INFO] Taverna Workbench ..................................... SUCCESS [0.249s]
[INFO] Taverna tools ......................................... SUCCESS [0.205s]
[INFO] Taverna Contrib ....................................... SUCCESS [0.921s]
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 21 seconds
[INFO] Finished at: Fri Dec 15 09:43:12 GMT 2006
[INFO] Final Memory: 16M/30M
[INFO] ------------------------------------------------------------------------
Go to the created subdirectory
target/taverna-1.5.0-bin/taverna-1.5.0, and double click on
runme.bat.
The Taverna workbench should appear.
Zip distribution
If you want a zip file instead, try
mvn package assembly:assembly. Note that the version number appearing while building will not be correct when you are building from the
HEAD CVS branch.
Updating sourcecode from CVS
Now and then you might want to run an CVS update to get our latest changes to the source code. To do this
in Windows with TortoiseCVS: Right click on the
taverna1.0 folder and select
CVS Update
Developing Taverna
To run with the actual compiled components, rather than those fetched from the remote repository, first install the artifacts by running
mvn install
Then edit the
target/taverna-1.5.0-bin/taverna-1.5.0/runme.bat to add the argument
-Draven.repository.0=file://path to local maven repository.
e.g. just before the java command add the line:
set ARGS=%ARGS% "-Draven.repository.0=file:///C:/Documents%20and%20Settings/name/.m2/repository/"
Linux/UNIX/OS X
We'll assume that Java Development Kit (JDK) 1.5 and CVS is installed on your system already. Instructions for how to install this software depends on the Linux distributions. Most distributions should come with CVS and Java, although some do require a few tricks to get Java installed.
We'll also assume you know how to use the shell/terminal.
Download and install Maven 2
From
http://maven.apache.org/download.html download
maven-2.0.x-bin.tar.bz2, this should lead you to something like
http://mirrors.dedipower.com/ftp.apache.org/maven/binaries/maven-2.0.4-bin.tar.bz2
: stain@rpc268 ~; wget http://mirrors.dedipower.com/ftp.apache.org/maven/binaries/maven-2.0.4-bin.tar.bz2
--09:09:42-- http://mirrors.dedipower.com/ftp.apache.org/maven/binaries/maven-2.0.4-bin.tar.bz2
=> `maven-2.0.4-bin.tar.bz2'
Resolving mirrors.dedipower.com... 81.29.64.234
Connecting to mirrors.dedipower.com|81.29.64.234|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1 164 175 (1.1M) [application/x-bzip2]
100%[==============================================================================================================>] 1 164 175 4.81M/s
09:09:43 (4.81 MB/s) - `maven-2.0.4-bin.tar.bz2' saved [1164175/1164175]
Install Maven 2, we'll install it system wide here, but you can place it
anywhere you like (as your home directory) as long as you fix the
PATH
to be able to run
mvn afterwards.
: stain@rpc268 ~; tar xjfv maven-2.0.4-bin.tar.bz2
maven-2.0.4/conf/
maven-2.0.4/core/plexus-container-default-1.0-alpha-9.jar
maven-2.0.4/core/plexus-utils-1.1.jar
(..)
: stain@rpc268 ~; sudo cp -r maven-2.0.4 /usr/local/
: stain@rpc268 ~; cd /usr/local/bin/
: stain@rpc268 /usr/local/bin; sudo ln -s ../maven-2.0.4/bin/m2 .
: stain@rpc268 /usr/local/bin; sudo ln -s ../maven-2.0.4/bin/mvn .
Make sure
/usr/local/bin is in
PATH (it usually is) and that Maven works.
: stain@rpc268 /usr/local/bin; cd
: stain@rpc268 ~; mvn -version
Maven version: 2.0.4
Maven mirrors
The default Maven mirrors can be quite unstable, unfortunately. We have found that using an alternate mirror can speed up the download and avoid the "Download failed.." (which is usually fixed by rerunning maven).
Add the mirror setting to the configuration file
$HOME/.m2/settings.xml. We might have to create the
.m2 directory the first time:
: stain@rpc268 ~; mkdir .m2
: stain@rpc268 ~; cd .m2/
: stain@rpc268 ~/.m2; cat > settings.xml
<settings>
<mirrors>
<mirror>
<id>sunsite.dk</id>
<url>http://mirrors.sunsite.dk/maven2</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
</settings>
[Press Ctrl-D to exit]
: stain@rpc268 ~/.m2;
Further details and other mirror sites are described at
http://maven.apache.org/guides/mini/guide-mirror-settings.html
If your network requires you to use a HTTP proxy, you can set up this as described in this
Maven guide
Download Taverna sourcecode from CVS
Follow
http://sourceforge.net/cvs/?group_id=74874 and download the target
taverna1.0
: stain@rpc268 ~; cvs -d:pserver:anonymous@taverna.cvs.sourceforge.net:/cvsroot/taverna login
Logging in to :pserver:anonymous@taverna.cvs.sourceforge.net:2401/cvsroot/taverna
CVS password:
: stain@rpc268 ~; cvs -z3 -d:pserver:anonymous@taverna.cvs.sourceforge.net:/cvsroot/taverna co -P taverna1.0
cvs checkout: Updating taverna1.0
U taverna1.0/assembly.xml
U taverna1.0/build.bat
U taverna1.0/build.xml
U taverna1.0/build_with_debug.bat
(..)
Note that your firewall must allow outbound connections to taverna.cvs.sourceforge.net:2401 for this to work.
Compile Taverna
Compile Taverna using Maven, this will also download any dependencies and make the distribution directory.
: stain@rpc268 ~; cd taverna1.0/
: stain@rpc268 ~/taverna1.0; mvn package assembly:directory
Test and run the directory
Go to the created subdirectory
target/taverna-1.5.0-bin/taverna-1.5.0, and double click on
runme.sh.
: stain@rpc268 ~/taverna1.0; cd target/taverna-1.5.0-bin/taverna-1.5.0
: stain@rpc268 ~/taverna1.0/target/taverna-1.5.0-bin/taverna-1.5.0; sh runme.sh
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO] Taverna
[INFO] Raven
[INFO] Raven log4j support
[INFO] Taverna bootstrapper
[INFO] Taverna Core
[INFO] Baclava
[INFO] Baclava Core
[INFO] Baclava UI
[INFO] Baclava Store Implementations
[INFO] Scufl
(...)
[INFO] RServ Processor ....................................... SUCCESS [0.085s]
[INFO] SeqHound Processor .................................... SUCCESS [0.098s]
[INFO] SoapLab Processor ..................................... SUCCESS [0.107s]
[INFO] String Constant Processor ............................. SUCCESS [0.072s]
[INFO] Talisman Processor .................................... SUCCESS [0.087s]
[INFO] WSDL Processor ........................................ SUCCESS [0.183s]
[INFO] Zaria ................................................. SUCCESS [0.431s]
[INFO] Taverna Scavenger UI .................................. SUCCESS [0.210s]
[INFO] Taverna Update Manager ................................ SUCCESS [0.189s]
[INFO] Taverna Workbench ..................................... SUCCESS [0.249s]
[INFO] Taverna tools ......................................... SUCCESS [0.205s]
[INFO] Taverna Contrib ....................................... SUCCESS [0.921s]
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 21 seconds
[INFO] Finished at: Fri Dec 15 09:43:12 GMT 2006
[INFO] Final Memory: 16M/30M
[INFO] ------------------------------------------------------------------------
Taverna workbench should appear on screen.
Zip distribution
If you want a zip file instead, try
mvn package assembly:assembly. Note that the version number appearing while building will not be correct when you are building from the
HEAD CVS branch.
Updating sourcecode from CVS
Now and then you might want to run an CVS update to get our latest changes to the source code. To do this:
Run
cvs update within the top directory
taverna1.0
Developing Taverna
To run with the actual compiled components, rather than those fetched from the remote repository, first install the artifacts by running
mvn install
Then edit the
target/taverna-1.5.0-bin/taverna-1.5.0/run.sh to add the argument
-Draven.repository.0=file://path to local maven repository.
e.g. just before the java command add the line:
ARGS="$ARGS -Draven.repository.0=file:///home/name/.m2/repository"