blob: de958391f4f76e9af77e5f1b426aa4f04b5defc8 [file] [log] [blame]
<!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" xml:lang="en" lang="en" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="SMILA/Documentation/HowTo/Howto build a SMILA-Distribution,Smila.build.all.png,SMILA/Development Guidelines/Howto set up dev environment" />
<link rel="shortcut icon" href="http://wiki.eclipse.org/SMILA/Development_Guidelines/favicon.ico" />
<link rel="search" type="application/opensearchdescription+xml" href="http://wiki.eclipse.org/opensearch_desc.php" title="Eclipsepedia (English)" />
<link rel="alternate" type="application/rss+xml" title="Eclipsepedia RSS Feed" href="http://wiki.eclipse.org/index.php?title=Special:Recentchanges&amp;feed=rss" />
<link rel="alternate" type="application/atom+xml" title="Eclipsepedia Atom Feed" href="http://wiki.eclipse.org/index.php?title=Special:Recentchanges&amp;feed=atom" />
<title>SMILA/Documentation/HowTo/Howto build a SMILA-Distribution - Eclipsepedia</title>
<style type="text/css" media="screen,projection">/*<![CDATA[*/ @import "http://wiki.eclipse.org/skins/eclipsenova/novaWide.css?116"; /*]]>*/</style>
<link rel="stylesheet" type="text/css" media="print" href="http://wiki.eclipse.org/skins/eclipsenova/eclipsenovaPrint.css?116" />
<link rel="stylesheet" type="text/css" media="handheld" href="http://wiki.eclipse.org/skins/eclipsenova/handheld.css?116" />
<link rel="stylesheet" type="text/css" href="http://wiki.eclipse.org/skins/eclipsenova/Nova/css/header.css" media="screen" />
<link rel="stylesheet" type="text/css" href="http://wiki.eclipse.org/skins/eclipsenova/tabs.css" media="screen" />
<link rel="stylesheet" type="text/css" href="http://wiki.eclipse.org/skins/eclipsenova/Nova/css/visual.css" media="screen" />
<link rel="stylesheet" type="text/css" href="http://wiki.eclipse.org/skins/eclipsenova/Nova/css/layout.css" media="screen" />
<link rel="stylesheet" type="text/css" href="http://wiki.eclipse.org/skins/eclipsenova/Nova/css/footer.css" media="screen" />
<!--[if IE]><link rel="stylesheet" type="text/css" href="/skins/eclipsenova/IEpngfix.css" media="screen" /><![endif]-->
<!--[if lt IE 5.5000]><style type="text/css">@import "/skins/eclipsenova/IE50Fixes.css?116";</style> <![endif]-->
<!--[if IE 5.5000]><style type="text/css">@import "/skins/eclipsenova/IE55Fixes.css?116";</style><![endif]-->
<!--[if IE 6]><style type="text/css">@import "/skins/eclipsenova/IE60Fixes.css?116";</style><![endif]-->
<!--[if IE 7]><style type="text/css">@import "/skins/eclipsenova/IE70Fixes.css?116";</style><![endif]-->
<!--[if lt IE 7]><script type="text/javascript" src="/skins/common/IEFixes.js?116"></script>
<meta http-equiv="imagetoolbar" content="no" /><![endif]-->
<script type= "text/javascript">/*<![CDATA[*/
var skin = "eclipsenova";
var stylepath = "/skins";
var wgArticlePath = "/$1";
var wgScriptPath = "";
var wgScript = "/index.php";
var wgServer = "http://wiki.eclipse.org";
var wgCanonicalNamespace = "";
var wgCanonicalSpecialPageName = false;
var wgNamespaceNumber = 0;
var wgPageName = "SMILA/Documentation/HowTo/Howto_build_a_SMILA-Distribution";
var wgTitle = "SMILA/Documentation/HowTo/Howto build a SMILA-Distribution";
var wgAction = "view";
var wgRestrictionEdit = [];
var wgRestrictionMove = [];
var wgArticleId = "18672";
var wgIsArticle = true;
var wgUserName = null;
var wgUserGroups = null;
var wgUserLanguage = "en";
var wgContentLanguage = "en";
var wgBreakFrames = false;
var wgCurRevisionId = "309707";
var wgVersion = "1.12.0";
var wgEnableAPI = true;
var wgEnableWriteAPI = false;
/*]]>*/</script>
<script type="text/javascript" src="http://wiki.eclipse.org/skins/common/wikibits.js?116"><!-- wikibits js --></script>
<!-- Performance mods similar to those for bug 166401 -->
<script type="text/javascript" src="http://wiki.eclipse.org/index.php?title=-&amp;action=raw&amp;gen=js&amp;useskin=eclipsenova"><!-- site js --></script>
<!-- Head Scripts -->
<script type="text/javascript" src="http://wiki.eclipse.org/skins/common/ajax.js?116"></script>
<style type="text/css">/*<![CDATA[*/
.source-text {line-height: normal; font-size: medium;}
.source-text li {line-height: normal;}
/**
* GeSHi Dynamically Generated Stylesheet
* --------------------------------------
* Dynamically generated stylesheet for text
* CSS class: source-text, CSS id:
* GeSHi (C) 2004 - 2007 Nigel McNie (http://qbnz.com/highlighter)
*/
.source-text .de1, .source-text .de2 {font-family: 'Courier New', Courier, monospace; font-weight: normal;}
.source-text {}
.source-text .head {}
.source-text .foot {}
.source-text .imp {font-weight: bold; color: red;}
.source-text .ln-xtra {color: #cc0; background-color: #ffc;}
.source-text li {font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;}
.source-text li.li2 {font-weight: bold;}
/*]]>*/
</style>
<style type="text/css">/*<![CDATA[*/
@import "http://wiki.eclipse.org/index.php?title=MediaWiki:Geshi.css&usemsgcache=yes&action=raw&ctype=text/css&smaxage=18000";
/*]]>*/
</style><link rel="stylesheet" type="text/css" href="Howto_build_a_SMILA-Distribution.html" /> </head>
<body class="mediawiki ns-0 ltr page-SMILA_Documentation_HowTo_Howto_build_a_SMILA-Distribution">
<div id="globalWrapper">
<div id="column-one">
<!-- Eclipse Additions for the Top Nav start here M. Ward-->
<div id="header">
<div id="header-graphic">
<img src="http://wiki.eclipse.org/skins/eclipsenova/eclipse.png" alt="Eclipse Wiki">
</div>
<!-- Pulled 101409 Mward -->
<div class="portlet" id="p-personal">
<div class="pBody">
<ul>
<li id="pt-login"><a href="http://wiki.eclipse.org/index.php?title=Special:Userlogin&amp;returnto=SMILA/Documentation/HowTo/Howto_build_a_SMILA-Distribution">Log in</a></li>
</ul>
</div>
</div>
<div id="header-icons">
<div id="sites">
<ul id="sitesUL">
<li><a href="http://www.eclipse.org"><img src="http://dev.eclipse.org/custom_icons/eclipseIcon.png" width="28" height="28" alt="Eclipse Foundation" title="Eclipse Foundation" /><div>Eclipse Foundation</div></a></li>
<li><a href="http://marketplace.eclipse.org"><img src="http://dev.eclipse.org/custom_icons/marketplace.png" width="28" height="28" alt="Eclipse Marketplace" title="Eclipse Marketplace" /><div>Eclipse Marketplace</div></a></li>
<li><a href="https://bugs.eclipse.org/bugs"><img src="http://dev.eclipse.org/custom_icons/system-search-bw.png" width="28" height="28" alt="Bugzilla" title="Bugzilla" /><div>Bugzilla</div></a></li>
<li><a href="http://live.eclipse.org"><img src="http://dev.eclipse.org/custom_icons/audio-input-microphone-bw.png" width="28" height="28" alt="Live" title="Live" /><div>Eclipse Live</div></a></li>
<li><a href="http://planeteclipse.org"><img src="http://dev.eclipse.org/large_icons/devices/audio-card.png" width="28" height="28" alt="PlanetEclipse" title="Planet" /><div>Planet Eclipse</div></a></li>
<li><a href="http://portal.eclipse.org"><img src="http://dev.eclipse.org/custom_icons/preferences-system-network-proxy-bw.png" width="28" height="28" alt="Portal" title="Portal" /><div>My Foundation Portal</div></a></li>
</ul>
</div>
</div>
</div>
<!-- NEW HEADER STUFF HERE -->
<div id="header-menu">
<div id="header-nav">
<ul> <li><a class="first_one" href="http://wiki.eclipse.org/" target="_self">Home</a></li> <li><a href="http://www.eclipse.org/downloads/" target="_self">Downloads</a></li>
<li><a href="http://www.eclipse.org/users/" target="_self">Users</a></li>
<li><a href="http://www.eclipse.org/membership/" target="_self">Members</a></li>
<li><a href="http://wiki.eclipse.org/index.php/Development_Resources" target="_self">Committers</a></li>
<li><a href="http://www.eclipse.org/resources/" target="_self">Resources</a></li>
<li><a href="http://www.eclipse.org/projects/" target="_self">Projects</a></li>
<li><a href="http://www.eclipse.org/org/" target="_self">About Us</a></li>
</ul>
</div>
<div id="header-utils">
<!-- moved the search window here -->
<form action="http://wiki.eclipse.org/Special:Search" >
<input class="input" name="search" type="text" accesskey="f" value="" />
<input type='submit' onclick="this.submit();" name="go" id="searchGoButton" class="button" title="Go to a page with this exact name if one exists" value="Go" />&nbsp;
<input type='submit' onclick="this.submit();" name="fulltext" class="button" id="mw-searchButton" title="Search Eclipsepedia for this text" value="Search" />
</form>
</div>
</div>
<!-- Eclipse Additions for the Header stop here -->
<!-- Additions and mods for leftside nav Start here -->
<!--Started nav rip here-->
<!-- these are the nav controls main page, changes etc -->
<div id="novaContent" class="faux">
<div id="leftcol">
<ul id="leftnav">
<!-- these are the page controls, edit history etc -->
<li class="separator"><a class="separator">Navigation &#160;&#160;</li>
<li id="n-mainpage"><a href="http://wiki.eclipse.org/Main_Page">Main Page</a></li>
<li id="n-portal"><a href="http://wiki.eclipse.org/Eclipsepedia:Community_Portal">Community portal</a></li>
<li id="n-currentevents"><a href="http://wiki.eclipse.org/Eclipsepedia:Current_events">Current events</a></li>
<li id="n-recentchanges"><a href="http://wiki.eclipse.org/Special:Recentchanges">Recent changes</a></li>
<li id="n-randompage"><a href="http://wiki.eclipse.org/Special:Random">Random page</a></li>
<li id="n-help"><a href="http://wiki.eclipse.org/Help:Contents">Help</a></li>
<li class="separator"><a class="separator">Toolbox &#160;&#160;</a></li>
<li id="t-whatlinkshere"><a href="http://wiki.eclipse.org/Special:Whatlinkshere/SMILA/Documentation/HowTo/Howto_build_a_SMILA-Distribution">What links here</a></li>
<li id="t-recentchangeslinked"><a href="http://wiki.eclipse.org/Special:Recentchangeslinked/SMILA/Documentation/HowTo/Howto_build_a_SMILA-Distribution">Related changes</a></li>
<!-- This is the toolbox section -->
<li id="t-upload"><a href="http://wiki.eclipse.org/Special:Upload">Upload file</a></li>
<li id="t-specialpages"><a href="http://wiki.eclipse.org/Special:Specialpages">Special pages</a></li>
<li id="t-print"><a href="http://wiki.eclipse.org/index.php?title=SMILA/Documentation/HowTo/Howto_build_a_SMILA-Distribution&amp;printable=yes">Printable version</a></li> <li id="t-permalink"><a href="http://wiki.eclipse.org/index.php?title=SMILA/Documentation/HowTo/Howto_build_a_SMILA-Distribution&amp;oldid=309707">Permanent link</a></li> </ul>
</div>
<!-- Additions and mods for leftside nav End here -->
<div id="column-content">
<div id="content">
<a name="top" id="top"></a>
<div id="tabs">
<ul class="primary">
<li class="active"><a href="../Documentation/HowTo/Howto_build_a_SMILA-Distribution.html"><span class="tab">Page</span></a></li>
<li><a href="http://wiki.eclipse.org/index.php?title=Talk:SMILA/Documentation/HowTo/Howto_build_a_SMILA-Distribution&amp;action=edit"><span class="tab">Discussion</span></a></li>
<li><a href="http://wiki.eclipse.org/index.php?title=SMILA/Documentation/HowTo/Howto_build_a_SMILA-Distribution&amp;action=edit"><span class="tab">View source</span></a></li>
<li><a href="http://wiki.eclipse.org/index.php?title=SMILA/Documentation/HowTo/Howto_build_a_SMILA-Distribution&amp;action=history"><span class="tab">History</span></a></li>
<li><a href="http://wiki.eclipse.org/index.php?title=Special:Userlogin&amp;returnto=SMILA/Documentation/HowTo/Howto&#32;build&#32;a&#32;SMILA-Distribution"><span class="tab">Edit</span></a></li>
</ul>
</div>
<script type="text/javascript"> if (window.isMSIE55) fixalpha(); </script>
<h1 class="firstHeading">SMILA/Documentation/HowTo/Howto build a SMILA-Distribution</h1>
<div id="bodyContent">
<h3 id="siteSub">From Eclipsepedia</h3>
<div id="contentSub"><span class="subpages">&lt; <a href="../../SMILA.html" title="SMILA">SMILA</a> | <a href="../Documentation.1.html" title="SMILA/Documentation">Documentation</a> | <a href="../Documentation/HowTo.html" title="SMILA/Documentation/HowTo">HowTo</a></span>(Redirected from <a href="http://wiki.eclipse.org/index.php?title=SMILA/Development_Guidelines/Howto_build_a_SMILA-Distribution&amp;redirect=no" title="SMILA/Development Guidelines/Howto build a SMILA-Distribution">SMILA/Development Guidelines/Howto build a SMILA-Distribution</a>)</div>
<div id="jump-to-nav">Jump to: <a href="Howto_build_a_SMILA-Distribution.html#column-one">navigation</a>, <a href="Howto_build_a_SMILA-Distribution.html#searchInput">search</a></div> <!-- start content -->
<p>This HowTo describes how to build a SMILA distribution.
</p>
<table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div>
<ul>
<li class="toclevel-1"><a href="Howto_build_a_SMILA-Distribution.html#Build_Requirements"><span class="tocnumber">1</span> <span class="toctext">Build Requirements</span></a></li>
<li class="toclevel-1"><a href="Howto_build_a_SMILA-Distribution.html#Configuring_the_Build"><span class="tocnumber">2</span> <span class="toctext">Configuring the Build</span></a>
<ul>
<li class="toclevel-2"><a href="Howto_build_a_SMILA-Distribution.html#Setting_the_Target_Build_Platform"><span class="tocnumber">2.1</span> <span class="toctext">Setting the Target Build Platform</span></a></li>
<li class="toclevel-2"><a href="Howto_build_a_SMILA-Distribution.html#Setting_Build_Properties"><span class="tocnumber">2.2</span> <span class="toctext">Setting Build Properties</span></a></li>
</ul>
</li>
<li class="toclevel-1"><a href="Howto_build_a_SMILA-Distribution.html#Executing_the_make.xml"><span class="tocnumber">3</span> <span class="toctext">Executing the make.xml</span></a>
<ul>
<li class="toclevel-2"><a href="Howto_build_a_SMILA-Distribution.html#Executing_make.xml_from_within_Eclipse"><span class="tocnumber">3.1</span> <span class="toctext">Executing make.xml from within Eclipse</span></a></li>
<li class="toclevel-2"><a href="Howto_build_a_SMILA-Distribution.html#Executing_make.xml_from_command_line"><span class="tocnumber">3.2</span> <span class="toctext">Executing make.xml from command line</span></a></li>
</ul>
</li>
</ul>
</td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
<a name="Build_Requirements"></a><h4> <span class="mw-headline"> Build Requirements </span></h4>
<p>The build process uses Eclipse's PDE Build tools to build all the bundles, run all unit tests, and create a ZIP archive with a complete SMILA application that can be installed and run independently from any development environment. To run this build process, you should first install the following software:
</p>
<ul><li><b>Eclipse SDK 4.2</b> for your operating system: We recommend installing a fresh Eclipse instance independently from the one you might already be using and use this solely for the purpose of building SMILA. This makes sure that any potential additional Eclipse plugins installed on your existing installation won't interfere with the build process (this shouldn't happen, usually - but just to be safe). You can find the download on <a href="http://download.eclipse.org/eclipse/downloads/" class="external free" title="http://download.eclipse.org/eclipse/downloads/" rel="nofollow">http://download.eclipse.org/eclipse/downloads/</a>. This HowTo was tested with <a href="http://download.eclipse.org/eclipse/downloads/drops4/R-4.2-201206081400/" class="external text" title="http://download.eclipse.org/eclipse/downloads/drops4/R-4.2-201206081400/" rel="nofollow">Eclipse Classic SDK 4.2</a>.
</li></ul>
<ul><li><b>DeltaPack</b> matching your Eclipse version: The DeltaPack contains some additional bundles needed in the build, mainly for creating the SMILA executable for different platforms. You'll find the download on <a href="http://download.eclipse.org/eclipse/downloads/" class="external free" title="http://download.eclipse.org/eclipse/downloads/" rel="nofollow">http://download.eclipse.org/eclipse/downloads/</a>. Install it by unpacking it into you Eclipse SDK installation. This HowTo was tested with <a href="http://download.eclipse.org/eclipse/downloads/drops4/R-4.2-201206081400/#DeltaPack" class="external text" title="http://download.eclipse.org/eclipse/downloads/drops4/R-4.2-201206081400/#DeltaPack" rel="nofollow">DeltaPack 4.2</a>.
</li></ul>
<ul><li><b>Sun Java Development Kit</b>: You need a full JDK, version 7, to build SMILA, not just a JRE. You can get it at <a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html" class="external autonumber" title="http://www.oracle.com/technetwork/java/javase/downloads/index.html" rel="nofollow">[1]</a>
</li></ul>
<ul><li><b>Apache Ant</b>: The build process is executed by Ant, which you can download here: <a href="http://ant.apache.org/" class="external free" title="http://ant.apache.org/" rel="nofollow">http://ant.apache.org/</a>. At least version 1.7 is needed (and tested).
</li></ul>
<ul><li><b>Additional Libraries</b> for building which are not included in SMILA repository. The build scripts assume the following directory structure for these libraries. You can either create this structure in your working copy of the SMILA repository next to all the SMILA bundles, or somewhere else on your hard disk and configure the build process to find them there (see below).
</li></ul>
<div style="margin-left: 1.5em">
<div dir="ltr" style="text-align: left;"><pre class="source-text">lib/
ant-contrib/
ant-contrib-1.0b3.jar
checkstyle/
checkstyle-all-5.5.jar
jacoco/
jacocoagent.jar, jacocoant.jar
pmd/
asm-3.2.jar, jaxen-1.1.1.jar, pmd-4.3.jar</pre></div>
</div>
<ul><li><ul><li>ant-contrib: This is required to run the build. You may download it from: <a href="http://sourceforge.net/projects/ant-contrib" class="external text" title="http://sourceforge.net/projects/ant-contrib" rel="nofollow">ant-contrib</a>. (Tested with ant-contrib 1.0b3)
</li><li>Furthermore our build process optionally generates reports for checkstyle, jacoco (code coverage) and pmd (static code analysis) if these libraries are present. The build is configured to run without these libraries and will just not create the respective reports, but everything else will be OK. To generate these reports you may download these files from:
<ul><li><a href="http://checkstyle.sourceforge.net/" class="external text" title="http://checkstyle.sourceforge.net/" rel="nofollow">checkstyle</a> (use Checkstyle 5.5, older versions will not handle Java-7 source code correctly).
</li><li><a href="http://eclemma.org/jacoco/" class="external text" title="http://eclemma.org/jacoco/" rel="nofollow">jacoco</a>. (Tested with jacoco 0.5.7 and higher)
</li><li><a href="http://pmd.sourceforge.net/" class="external text" title="http://pmd.sourceforge.net/" rel="nofollow">pmd</a>. (Tested with pmd 4.3)
</li></ul>
</li></ul>
</li></ul>
<a name="Configuring_the_Build"></a><h4> <span class="mw-headline"> Configuring the Build </span></h4>
<p>The folder <tt>SMILA.builder</tt> contains everything needed to build SMILA and/or run all tests locally. The default settings are set to build against Eclipse 4.2 and build a product for Win 32bit and 64bit, Linux 32bit and 64bit as well as MacOS x86 64bit. But it is also possible to build other platforms. &nbsp;
</p><p>Whether you build from command line or from Eclipse, in both cases the <tt>make.xml</tt> ant script is executed. Before execution certain properties need to be set to meet the local setup.
</p>
<a name="Setting_the_Target_Build_Platform"></a><h5> <span class="mw-headline"> Setting the Target Build Platform </span></h5>
<p><i>First, <a href="Howto_set_up_dev_environment.html" class="mw-redirect" title="SMILA/Development Guidelines/Howto set up dev environment">setup a development environment</a>.</i> When finished copy the file <tt>SMILA.builder/build.properties.template</tt> to <tt>SMILA.builder/build.properties</tt> and adapt the copied file: Add the platforms that you want to build as value triplets to the <tt>configs</tt> property and comment out or remove those that you don't need. The available platform triplets are:<br />
</p>
<table border="1">
<caption> <br />
</caption>
<tr>
<th> Windows 32bit
</th><td> <table><tr><td>
<pre>...
configs=win32,win32,x86
# ... </pre>
</td></tr></table>
</td></tr>
<tr>
<th> Windows 64bit
</th><td> <table><tr><td>
<pre>...
configs=win32,win32,x86_64
# ... </pre>
</td></tr></table>
</td></tr>
<tr>
<th> Linux 32bit
</th><td> <table><tr><td>
<pre>...
configs=linux,gtk,x86
# ... </pre>
</td></tr></table>
</td></tr>
<tr>
<th> Linux 64bit
</th><td> <table><tr><td>
<pre>...
configs=linux, gtk, x86_64
# ... </pre>
</td></tr></table>
</td></tr>
<tr>
<th> Solaris SPARC
</th><td> <table><tr><td>
<pre>...
configs=solaris, gtk, sparc
# ... </pre>
</td></tr></table>
</td></tr></table>
<p>If you want to provide several distributions at once e.g one for Windows 32bit and one for Linux 32bit (default build plan), concatenate the platform triplets with the '&amp;' character:<br />
</p>
<table border="1">
<tr>
<th> Example:
</th><td> <table><tr><td>
<pre>configs=win32, win32, x86 &amp; \
linux, gtk, x86 </pre>
</td></tr></table>
</td></tr></table>
<p>The archive files of the application distribution are created in the <tt>Application</tt> directory below the specified build directory (see below). For each platform triplet in the <tt>configs</tt> property (<tt>$os, $ws, $arch</tt>) a ZIP file named <tt>SMILA-incubation-$os.$ws.$arch.zip</tt> is built.
</p>
<a name="Setting_Build_Properties"></a><h5> <span class="mw-headline"> Setting Build Properties </span></h5>
<p>These are the main properties that can be used to configure the build process executed by <tt>make.xml</tt>. If you run the build from within Eclipse you must add them to the Ant launch configuration (see <a href="Howto_build_a_SMILA-Distribution.html#Executing_make.xml_from_within_Eclipse" title="">Executing make.xml from within Eclipse</a> below), for running from command line we have included templates that you can adapt to your local setup (see <a href="Howto_build_a_SMILA-Distribution.html#Executing_make.xml_from_command_line" title="">Executing make.xml from command line</a> below).
</p>
<table cellspacing="0" cellpadding="5" border="1">
<tr>
<th> Property
</th><th> Default
</th><th> Comment
</th></tr>
<tr>
<td> <tt>buildDirectory</tt>
</td><td> <tt>&lt;SMILA_HOME&gt;/eclipse.build</tt>
</td><td> Directory where built output will be created. This should be always a subdirectory of &lt;SMILA_HOME&gt;. The application distribution's ZIP files will be created in the subdirectory <tt>Application</tt> of this directory.
</td></tr>
<tr>
<td> <tt>builder</tt>
</td><td> <tt>&lt;SMILA_HOME&gt;/SMILA.builder</tt>
</td><td> Directory where <tt>make.xml</tt> is locate.
</td></tr>
<tr>
<td> <tt>eclipse.home</tt>
</td><td> <tt>&lt;ECLIPSE_HOME&gt;</tt>
</td><td> Location of the <a href="Howto_build_a_SMILA-Distribution.html#Build_Requirements" title="">Eclipse instance</a> used to build SMILA.
</td></tr>
<tr>
<td> <tt>lib.dir</tt>
</td><td> <tt>&lt;SMILA_HOME&gt;/lib</tt>
</td><td> Location of the additional build libs (ant-contrib, etc.).
</td></tr>
<tr>
<td> <tt>os</tt>
</td><td> win32
</td><td rowspan="3"> These properties merely control under which platform the test will run. It must be one of the <a href="Howto_build_a_SMILA-Distribution.html#Setting_the_Target_Build_Platform" title="">target platforms</a> you have built.
</td></tr>
<tr>
<td> <tt>ws</tt>
</td><td> win32
</td></tr>
<tr>
<td> <tt>arch</tt>
</td><td> x86
</td></tr>
<tr>
<td> <tt>test.java.home</tt>
</td><td> <tt>&lt;JAVA_HOME&gt;</tt>
</td><td> A Java 1.7 SDK instance.
</td></tr></table>
<a name="Executing_the_make.xml"></a><h4> <span class="mw-headline"> Executing the make.xml </span></h4>
<div class="thumb tright"><div class="thumbinner" style="width:182px;"><a href="http://wiki.eclipse.org/Image:Smila.build.all.png" class="image" title="all dependency graph"><img alt="all dependency graph" src="http://wiki.eclipse.org/images/thumb/3/30/Smila.build.all.png/180px-Smila.build.all.png" width="180" height="161" border="0" class="thumbimage" /></a> <div class="thumbcaption"><div class="magnify"><a href="http://wiki.eclipse.org/Image:Smila.build.all.png" class="internal" title="Enlarge"><img src="http://wiki.eclipse.org/skins/common/images/magnify-clip.png" width="15" height="11" alt="" /></a></div>all dependency graph</div></div></div>
<p>The default target is <tt>all</tt>, building the application and running all unit tests. Note that this can take quite a while. To build the distribution archives only, use the targets <tt>clean</tt> and <tt>final-application</tt>. The <a href="http://wiki.eclipse.org/Image:Smila.build.all.png" title="Image:Smila.build.all.png">dependency graph</a> explains what will happen and shows the relevant targets you may call instead.
</p>
<a name="Executing_make.xml_from_within_Eclipse"></a><h5> <span class="mw-headline"> Executing make.xml from within Eclipse </span></h5>
<p>Steps:
</p>
<ol><li>Select the <tt>SMILA.builder</tt> bundle.
</li><li>Open the <i>External Tools Configuration</i> dialog (select <i>Run -&gt; External Tools -&gt; External Tools Configuration</i>).
</li><li>Create a new <i>Ant Build</i> configuration.
</li><li>In the <i>Buildfile</i> field, enter: <tt>${workspace_loc:/SMILA.builder/make.xml}</tt>.
</li><li>In the <i>Base Directory</i> field, enter: <tt>${workspace_loc:/SMILA.builder}</tt>.
</li><li>Add all properties from <a href="Howto_build_a_SMILA-Distribution.html#Setting_Build_Properties" title="">above</a> into the <i>Arguments</i> field (and adapt them to meet your setup) but prepend each with <tt>-D</tt> so each is passed into <tt>ant</tt> as a property (note that <tt>buildDirectory</tt> should be a subdirectory of your SMILA workspace directory), e.g. when using Eclipse 3.7.2 to build:
<dl><dd>-DbuildDirectory=D:/workspace/SMILA/eclipse.build
</dd><dd>&nbsp;-Declipse.home=D:/eclipse42
</dd><dd>-Dbuilder=D:/workspace/SMILA/SMILA.builder
</dd><dd>-Declipse.running=true
</dd><dd>-Dos=win32 -Dws=win32 -Darch=x86
</dd><dd>-Dlib.dir=D:/workspace/SMILA/lib
</dd></dl>
</li><li>Apply, and run the Ant build.<br /><b>Note:</b> To start another than the default target select the targets of your choice on the <i>Targets</i> tab.
</li></ol>
<a name="Executing_make.xml_from_command_line"></a><h5> <span class="mw-headline"> Executing make.xml from command line </span></h5>
<p>The <tt>make.bat</tt> and <tt>make.sh</tt> files are just shell scripts setting the properties that are needed for the Ant script. These files exist only as templates in SVN with <tt>.#~#~#</tt> appended to denote their template nature. Copy one of them matching your system and rename them as you like, but note that the names <tt>make.bat</tt> and <tt>make.sh</tt> are already in the svn:ignore list to prevent them from beeing committed accidentally, so it is recommended to use them.
</p><p>Both scripts are very similar, they start with setting some environment variables which are then used to create the build configuration properties and eventually feed them into an Ant call. There are the variables you usually need to check and adapt:
</p>
<table cellspacing="0" cellpadding="5" border="1">
<tr>
<th> Variable
</th><th> Comment
</th></tr>
<tr>
<td> <tt>SMILA_HOME </tt>
</td><td> Location of your SVN working copy. May be derived automatically in the <tt>.sh</tt> script, in the batch file, however, you must set it yourself.
</td></tr>
<tr>
<td> <tt>ECLIPSE_HOME </tt>
</td><td> Location of the <a href="Howto_build_a_SMILA-Distribution.html#Build_Requirements" title="">Eclipse instance</a> used to build SMILA.
</td></tr>
<tr>
<td> <tt>ARCH </tt>
</td><td> Operating system and platform settings for running the tests. See description of <tt>os</tt>, <tt>ws</tt> and <tt>arch</tt> properties above.
</td></tr>
<tr>
<td> <tt>JAVA_HOME </tt>
</td><td> Location of the JDK to build and run tests in. Must match the <tt>ARCH</tt> setting.
<p><b>Tip:</b> If your compile log complaints about a non-1.6 compatible JVM despite the correct settings, you must also add the <span style="font-family:monospace;">JAVA_HOME</span> location to the <span style="font-family:monospace;">ECLIPSE_HOME/eclipse.ini</span> like so:<br /> <span style="font-family:monospace;">
-vm<br />
&lt;JAVA_HOME&gt;\bin</span>
</p>
</td></tr>
<tr>
<td> <tt>ANT_HOME </tt>
</td><td> Location of your ANT installation.
</td></tr>
<tr>
<td> <tt>BUILDLIB_DIR </tt>
</td><td> Location of your build files. If you placed them in the SMILA_HOME you can leave this untouched and comment out the <tt>libDir</tt> setting in the next line.
</td></tr>
<tr>
<td> <tt>buildOpts </tt>
</td><td> Use the default <tt>buildOpts</tt> for Eclipse pdebuild or adapt them if you have another version installed.
</td></tr></table>
<p>Usually you don't need to change anything below the line setting <tt>buildOpts</tt>.
</p><p>To run a build with the default target (<tt>all</tt>), open a command prompt or shell in the <tt>SMILA.builder</tt> directory and just enter.
</p>
<div dir="ltr" style="text-align: left;"><pre class="source-text">make</pre></div>
<p>To execute another than the default target, just pass it (or them) as an argument:
</p>
<div dir="ltr" style="text-align: left;"><pre class="source-text">make build</pre></div>
<p>For example, to build the application distribution ZIPs without running the tests (which can take quite long), you can use:
</p>
<div dir="ltr" style="text-align: left;"><pre class="source-text">make clean final-application</pre></div>
<p>In Windows you will not see much output in the command prompt window, because the batch file redirects it to a logfile (named <tt>log.make</tt>, if the batch file is <tt>make.bat</tt>) so that you can check for error details after the build. You can install the <a href="http://gnuwin32.sourceforge.net/" class="external text" title="http://gnuwin32.sourceforge.net/" rel="nofollow">GnuWin32</a> or <a href="http://www.cygwin.com/" class="external text" title="http://www.cygwin.com/" rel="nofollow">Cygwin</a> tools and use <tt>tee</tt> to have the output written to both console and logfile. The template contains the changed ANT call as a comment quite at the end of the script.
</p>
<!--
NewPP limit report
Preprocessor node count: 161/1000000
Post-expand include size: 646/2097152 bytes
Template argument size: 298/2097152 bytes
#ifexist count: 0/100
-->
<!-- Saved in parser cache with key wikidb:pcache:idhash:18672-0!1!0!!en!2!edit=0 and timestamp 20120710050126 -->
<div class="printfooter">
Retrieved from "<a href="../Documentation/HowTo/Howto_build_a_SMILA-Distribution.html">http://wiki.eclipse.org/SMILA/Documentation/HowTo/Howto_build_a_SMILA-Distribution</a>"</div>
<div id="catlinks"><p class='catlinks'><a href="http://wiki.eclipse.org/Special:Categories" title="Special:Categories">Category</a>: <span dir='ltr'><a href="http://wiki.eclipse.org/Category:SMILA" title="Category:SMILA">SMILA</a></span></p></div> <!-- end content -->
<div class="visualClear"></div>
</div>
</div>
</div>
<!-- Yoink of toolbox for phoenix moved up -->
</div>
</div>
<div id="clearFooter"/>
<div id="footer" >
<ul id="footernav">
<li class="first"><a href="http://www.eclipse.org/">Home</a></li>
<li><a href="http://www.eclipse.org/legal/privacy.php">Privacy Policy</a></li>
<li><a href="http://www.eclipse.org/legal/termsofuse.php">Terms of Use</a></li>
<li><a href="http://www.eclipse.org/legal/copyright.php">Copyright Agent</a></li>
<li><a href="http://www.eclipse.org/org/foundation/contact.php">Contact</a></li>
<li><a href="http://wiki.eclipse.org/Eclipsepedia:About" title="Eclipsepedia:About">About Eclipsepedia</a></li>
</ul>
<span id="copyright">Copyright &copy; 2012 The Eclipse Foundation. All Rights Reserved</span>
<p id="footercredit">This page was last modified 11:11, 4 July 2012 by <a href="http://wiki.eclipse.org/User:Juergen.schumacher.empolis.com" title="User:Juergen.schumacher.empolis.com">Juergen Schumacher</a>. Based on work by <a href="http://wiki.eclipse.org/index.php?title=User:Juergen.schumacher.attensity.com&amp;action=edit" class="new" title="User:Juergen.schumacher.attensity.com">Juergen Schumacher</a>, <a href="http://wiki.eclipse.org/index.php?title=User:Nadine.auslaender.attensity.com&amp;action=edit" class="new" title="User:Nadine.auslaender.attensity.com"> </a> and <a href="http://wiki.eclipse.org/User:Andreas.schank.attensity.com" title="User:Andreas.schank.attensity.com">A. Schank</a> and <a href="http://wiki.eclipse.org/index.php?title=SMILA/Documentation/HowTo/Howto_build_a_SMILA-Distribution&amp;action=credits" title="SMILA/Documentation/HowTo/Howto build a SMILA-Distribution">others</a>.</p>
<p id="footerviews">This page has been accessed 4,855 times.</p>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-910670-4");
pageTracker._trackPageview();
</script>
<!-- <div class="visualClear"></div> -->
<script type="text/javascript">if (window.runOnloadHook) runOnloadHook();</script>
</div>
<!-- Served in 0.057 secs. --></body></html>