blob: a34fa3effcc1c88e82b42500477beb53201864b4 [file] [log] [blame]
<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Committers - Machine Setup</title>
<link type="text/css" rel="stylesheet" href="../../book.css"/>
</head>
<body>
<table class="navigation" style="width: 100%;" border="0" summary="navigation">
<tr>
<th style="width: 100%" align="center" colspan="3">Machine Setup</th>
</tr>
<tr>
<td style="width: 20%" align="left">
<a href="Committers.html" title="Committers">
<img alt="Previous" border="0" src="../../images/prev.gif"/>
</a>
</td>
<td style="width: 60%" align="center"></td>
<td style="width: 20%" align="right">
<a href="Policies.html" title="Policies">
<img alt="Next" border="0" src="../../images/next.gif"/>
</a>
</td>
</tr>
<tr>
<td style="width: 20%" align="left" valign="top">Committers</td>
<td style="width: 60%" align="center"></td>
<td style="width: 20%" align="right" valign="top">Policies</td>
</tr>
</table><hr/>
<h1 id="Machine_Setup">Machine Setup</h1>
<p>You need Sun JDK 6, Apache Ant 1.8.2 or later, and
<a href="http://wiki.eclipse.org/Git" title="Git" target="doc_external">git</a>. You'll probably want an IDE such as Eclipse and, in order for Virgo projects to build under Eclipse, the
<a href="http://wiki.eclipse.org/Virgo/Tooling" target="doc_external">Virgo IDE tooling</a> and AJDT (the current update site may be found on
<a href="http://www.eclipse.org/ajdt/downloads/" target="doc_external">http://www.eclipse.org/ajdt/downloads/</a>).
</p>
<p>&lt;span style="color:#ff0000"&gt;Don't forget to install AJDT as this is needed so that Eclipse produces the same compiled classes as the Ant build!&lt;/span&gt;</p>
<p>At the time of writing, some ant targets occasionally fail because they cannot load classes from jsch-0.1.42.jar. A workaround on Mac OS X is to copy this JAR from virgo-build's /lib/ivy directory to /opt/local/share/java/apache-ant/lib.</p>
<p>On Mac OS X, increase the default number of concurrently open files by adding this to .profile:</p>
<pre> ulimit -n 10000
</pre>
<p>To run certain scripts (don't run them unless you know what you're doing—and why), you'll need ruby, gems, and the 'choice' gem. On Mac OS you can get these by installing the XCode tools (from the Mac OS X disk) and
<a href="http://www.macports.org/" target="doc_external">MacPorts</a>, then issuing:
</p>
<pre> sudo port -v install ruby
sudo port -v install rb-rubygems
sudo gem install --remote choice
</pre>
<p>To run scripts such as Releaselor or Ripplor you'll need to:</p>
<ol>
<li>Generate SSH key by calling ssh-keygen without a passphrase</li>
<li>Upload your public SSH key to build.eclipse.org
<ul>
<li>login with user &lt;code&gt;virgoBuild&lt;/code&gt;</li>
<li>follow the steps described
<a href="http://wiki.eclipse.org/Git#Setting_up_ssh_keys" title="Git#Setting_up_ssh_keys" target="doc_external">here</a>
</li>
</ul>
</li>
<li>Log in (adding the host key) at lease once to:
<ul>
<li>build.eclipse.org</li>
<li>download1.eclipse.org</li>
</ul>
</li>
<li>Add your private key to ANT_OPTS:</li>
</ol>
<pre> -Dkey.file=$HOME/.ssh/id_dsa
</pre>
<p>If you have headless environment you may want to add to ANT_OPTS:</p>
<pre> -Djava.awt.headless=true
</pre>
<p>To enable Clover you will need to specify in ANT_OPTS the path to the licence:</p>
<pre> -Dclover.license.path=/opt/clover.license
</pre>
<h2 id="Notes_for_Ubuntu_10.04">Notes for Ubuntu 10.04</h2>
<h3 id="JDK">JDK</h3>
<p>I have found that the &lt;code&gt;sun-java6-jdk&lt;/code&gt; package is not installable directly from a fresh install of this level of Ubuntu (I'm running this in a virtual machine). (I set &lt;code&gt;JAVA_HOME&lt;/code&gt; to be &lt;code&gt;/usr/lib/jvm/java-6-sun&lt;/code&gt; which is a symbolic link, and this doesn't need updating after the install below.)</p>
<p>To get the jdk to be installed I issued the following commands (which you might find useful):</p>
<pre> sudo add-apt-repository "deb http:''//''archive.canonical.com''/'' lucid partner"
</pre>
<p>(which made the package visible to the package-manager)</p>
<pre> sudo apt-get update
</pre>
<p>(to reset the package-manager indexes)</p>
<pre> sudo apt-get install --fix-missing sun-java6-jdk
</pre>
<p>The &lt;code&gt;--fix-missing&lt;/code&gt; option is necessary since other packages are required.</p>
<h3 id="jsch_library">jsch library</h3>
<p>The JCraft's
<a href="http://www.jcraft.com/jsch/" target="doc_external">jsch library</a> needed for SSH/SCP support in ANT may need to be installed, e.g.:
</p>
<pre> sudo apt-get install libjsch-java
</pre>
<p>Check in ANT if its available: </p>
<pre> ant -diagnostics
</pre>
<p>If the output says under "Tasks availability" &lt;code&gt;sshexec&nbsp;: Missing dependency com.jcraft.jsch.Logger&lt;/code&gt;, then you'll need to provide this library to ANT. On Linux you can do this by creating a symlink: </p>
<pre> sudo ln -s /usr/share/java/jsch-0.1.42.jar /usr/share/ant/lib/jsch-0.1.42.jar
</pre>
<p>or on Mac OS, place (a link to) the JAR in ~/.ant/lib:</p>
<pre> cp jsch-0.1.42.jar ~/.ant/lib/.
</pre>
<p>Finally, you may check if the JAR is correct (as suggested in this
<a href="http://cafe.elharo.com/programming/java-programming/could-not-load-a-dependent-class-comjcraftjschlogger/" target="doc_external">blog</a>):
</p>
<pre> jar tvf /usr/share/ant/lib/jsch*jar
</pre>
<p>or:</p>
<pre> jar tvf ~/.ant/lib/jsch*jar
</pre>
<p>If everything is ok you should get a list of files inside the archive. Be sure to check "ant -diagnostics" too.</p><hr/>
<table class="navigation" style="width: 100%;" border="0" summary="navigation">
<tr>
<td style="width: 20%" align="left">
<a href="Committers.html" title="Committers">
<img alt="Previous" border="0" src="../../images/prev.gif"/>
</a>
</td>
<td style="width: 60%" align="center">
<a href="Committers.html" title="Committers">
<img alt="Committers" border="0" src="../../images/home.gif"/>
</a>
</td>
<td style="width: 20%" align="right">
<a href="Policies.html" title="Policies">
<img alt="Next" border="0" src="../../images/next.gif"/>
</a>
</td>
</tr>
<tr>
<td style="width: 20%" align="left" valign="top">Committers</td>
<td style="width: 60%" align="center"></td>
<td style="width: 20%" align="right" valign="top">Policies</td>
</tr>
</table>
</body>
</html>