wiki:Devel/Index = Guides for Developers = == Source Code Repository == * Subversion: http://svn.utgenome.org/utgb/trunk/utgb * Checkout http://svn.utgenome.org/utgb/trunk/utgb folder {{{ svn checkout http://svn.utgenome.org/utgb/trunk/utgb utgb }}} This operation will download the following folders {{{ maven utgb-common utgb-core utgb-medaka utgb-mmdb utgb-gallery }}} == Install Maven2 (Optional) == * Maven2 http://maven.apache.org/ * Download & Installation Notes: http://maven.apache.org/download.html#Installation {{{ Windows 2000/XP 1. Unzip maven-2.0.7-bin.zip to the directory you wish to install Maven 2.0.7. These instructions assume you chose C:\Program Files\Apache Software Foundation\maven-2.0.7 2. Add the bin directory to your path, by opening up the system properties (WinKey + Pause), selecting the "Advanced" tab, and the "Environment Variables" button, then editing the PATH variable in the user variables. eg. "C:\Program Files\Apache Software Foundation\maven-2.0.7\bin";%PATH% 3. In the same dialog, make sure that JAVA_HOME is set to the location of your JDK, eg. C:\Program Files\Java\jdk1.5.0_02 4. Run mvn --version to verify that it is correctly installed. Unix-based Operating Systems (Linux, Solaris and Mac OS X) 1. Extract the distribution archive to the directory you wish to install Maven 2.0.7. These instructions assume you chose /usr/local/maven-2.0.7 . The directory maven-2.0.7 will be created from the archive. 2. Add the bin directory to your path, eg. export PATH=/usr/local/maven-2.0.7/bin:$PATH 3. Make sure that JAVA_HOME is set to the location of your JDK, eg. export JAVA_HOME=/usr/java/jdk1.5.0_02 4. Run mvn --version to verify that it is correctly installed. }}} == Development with Eclipse == * Download [http://eclipse.org Eclipse] * Install [http://subclipse.tigris.org Subclipse] (or [http://www.polarion.org/index.php?page=overview&project=subversive Subversive]) plug-in. * Eclipse -> Help -> Software Updates -> Find/Install -> (Select "Search new features to install") -> (Push "New Remote Site") * add http://subclipse.tigris.org/update_1.0.x or * http://subclipse.tigris.org/update_1.2.x (Eclipse 3.2~) * Install Q4E plugin (maven plugin): update site http://q4e.googlecode.com/svn/trunk/updatesite/ * Installation notes: http://code.google.com/p/q4e/wiki/Installation * Open the SVN Repository Explorer perspective, then add new remote site, http://dev.utgenome.org/svn/utgb. * Checkout the http://svn.utgenome.org/utgb/trunk/utgb/utgb-core folder as an Eclipse (or Maven2) project. === Installing GWT === To launch GWT Shell, you must execute the following command within the utgb-core folder: {{{ utgb-core > mvn generate-sources }}} or run (right-click on your Eclipse project) -> Maven2 -> Execute Goal -> (Input generate-sources in the Goal text box). This will download gwt-dev-(os name).jar and other dynamic link libraries into utgb-core/gwt-home folder. (The following process is no longer required since maven plug-in automatically downloads necessary libraries) * Download the latest version of [http://code.google.com/webtoolkit/ Google Web Toolkit], matching your OS environment. * http://svn.utgenome.org/utgb/trunk/archive/gwt * Expand the archive, for example, c:\home\leo\local\gwt-win-1.4.10 * Set the class path variable named GWT_HOME in your Eclipse (Window -> Preferences -> Java -> Build Path -> Classpath): {{{ GWT_HOME=(your GWT installation folder) }}} == Launch the GWT Develpment Shell == 1. Click the side-cursor on the Debug botton, then select "UTGBResourceCenter" 1. GWT Shell Window and Hosted-mode browser, which is exactly IE plug-in (in Windows), will open after 10~30 seconds. == Other Useful Plug-ins for Eclipse == * [http://www.eclipse.org/mylyn Mylyne] * Update site: (for Eclipse 3.2) http://download.eclipse.org/tools/mylyn/update/e3.2 * Task-oriented development support utilities with Trac Ticket/Wiki view, modify, query facilities. * [http://kurucz-grafika.de/fatjar FatJar] * Packs all required Jar files into a single Jar file. * [http://www.eclipse.org/buckminster/downloads.html Buckminster] * required to install Subclipse & Mylyn integration feature * [http://rubyeclipse.sourceforge.net/ Ruby Development Toolkit] * My bookmarks.xml for Eclipse3.2 {{{ }}} ---- The following contents are retrieved from [source:trunk/browser/README]: = Build & Debug (with Eclipse) = 1. Install GWT (Google Web Toolkit. version 1.4.10 or higher) 1. In Window->Preference->Java->Classpath Variables, add a new variable as follows: {{{ GWT_HOME=(your GWT installation folder) }}} 1. (debug) launch Debug -> GenomeBrowser_gwtshell, which displays GWT debug shell and genome browser interface. = Build (from command line) = 1. Download the Google Web Toolkit from the web. Version 1.4.10 or higher is required. 1. Copy 'build.properties.sample' to 'build.properties' 1. Open the 'build.property' file, then change the gwt.home variable to the path of your GWT (Google Web Toolkit) folder, and comment out appropriate 'gwt.dev' lines to select GWT develeopement library on your OS. - e.g. (in Windows) {{{ gwt.home=C:/(somewhere in your PC)/gwt-windows-1.4.10 gwt.dev=gwt-dev-windows.jar #gwt.dev=gwt-dev-mac.jar #gwt.dev=gwt-dev-linux.jar }}} 1. {{{ > ant compileJs }}} 1. Open www/org.utgenome.gwt.utgb.UTGB/UTGB.html in your web browser (IE, Firefox, etc.) = Deploy = 1. Install Tomcat 5.0 (or higher) Java web server. 1. Edit your build.properties file, and modify the following variables: {{{ TOMCAT_HOME=(Tomcat Installation folder) tomcat.base.url=http://localhost:8080 tomcat.manager.username=(tomcat manager username) tomcat.manager.password=(tomcat manager password) }}} 1. Set up GWT as described above (the section on build from command line) 1. {{{ > ant deploy }}} * This generates a war file (web application archive), and deploy the war file in the tomcat server = Trouble Shooting = * Q: GWT Shell invokes a following error: {{{ [ERROR] Errors in 'jar:file(...)UTGB%20Common/lib/gwt-dragdrop-1.0RC.jar!/com/allen_sauer/gwt/dragdrop/client/DeferredMoveCommand.java' }}} * A: Your GWT version must be higher than 1.4.10 in order to use drag & drop facility. * Q: out of memory error when running Ant. * A: create a $HOME/.ant/ant.conf file, then write the following line: {{{ ANT_OPTS="-Xmx512M" }}}