<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Scala-fr &#187; Compilation</title>
	<atom:link href="http://www.scala-fr.org/categories/compilation/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.scala-fr.org</link>
	<description>communauté francophone autour du langage Scala</description>
	<lastBuildDate>Sat, 10 Oct 2009 08:01:07 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Complétion maven pour zsh</title>
		<link>http://www.scala-fr.org/completion-maven-pour-zsh/</link>
		<comments>http://www.scala-fr.org/completion-maven-pour-zsh/#comments</comments>
		<pubDate>Sat, 03 Oct 2009 13:12:07 +0000</pubDate>
		<dc:creator>Maxime Biais</dc:creator>
				<category><![CDATA[Compilation]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[outils]]></category>
		<category><![CDATA[zsh]]></category>

		<guid isPermaLink="false">http://www.scala-fr.org/?p=172</guid>
		<description><![CDATA[A ma grande déception zsh ne complète pas la commande maven. A force de taper des commandes mvn qqhcose, j&#8217;en avais assez, j&#8217;ai donc fait un petit script pour compléter les commandes que j&#8217;utilise le plus souvent avec maven et le plugin Scala :

function mainClasses &#123;
    if &#91; -d ./src &#93; ; [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.scala-fr.org%2Fcompletion-maven-pour-zsh%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.scala-fr.org%2Fcompletion-maven-pour-zsh%2F" height="61" width="51" /></a></div><p>A ma grande déception zsh ne complète pas la commande maven. A force de taper des commandes <code>mvn qqhcose</code>, j&#8217;en avais assez, j&#8217;ai donc fait un petit script pour compléter les commandes que j&#8217;utilise le plus souvent avec maven et le plugin Scala :</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> mainClasses <span style="color: #7a0874; font-weight: bold;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-d</span> .<span style="color: #000000; font-weight: bold;">/</span>src <span style="color: #7a0874; font-weight: bold;">&#93;</span> ; <span style="color: #000000; font-weight: bold;">then</span>
	<span style="color: #c20cb9; font-weight: bold;">find</span> .<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>main <span style="color: #660033;">-type</span> f <span style="color: #660033;">-iname</span> <span style="color: #ff0000;">&quot;*.scala&quot;</span>  <span style="color: #660033;">-o</span> <span style="color: #660033;">-iname</span> <span style="color: #ff0000;">&quot;*.java&quot;</span> \
             <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #ff0000;">'s?.*src/main/[^/]*/\(.*\)\..*?-DmainClass=\1?'</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #ff0000;">'s+/+.+g'</span>
    <span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> mainTests <span style="color: #7a0874; font-weight: bold;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #660033;">-d</span> .<span style="color: #000000; font-weight: bold;">/</span>src <span style="color: #7a0874; font-weight: bold;">&#93;</span> ; <span style="color: #000000; font-weight: bold;">then</span>
	<span style="color: #c20cb9; font-weight: bold;">find</span> .<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #660033;">-type</span> f <span style="color: #660033;">-iname</span> <span style="color: #ff0000;">&quot;*test*.scala&quot;</span>  <span style="color: #660033;">-o</span> <span style="color: #660033;">-iname</span> <span style="color: #ff0000;">&quot;*test*.java&quot;</span>  \
             <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #ff0000;">'s?.*src/test/[^/]*/\(.*\)\..*?-Dtest=\1?'</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #ff0000;">'s+/+.+g'</span>
    <span style="color: #000000; font-weight: bold;">fi</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> listMavenCompletions <span style="color: #7a0874; font-weight: bold;">&#123;</span>
<span style="color: #007800;">reply</span>=<span style="color: #7a0874; font-weight: bold;">&#40;</span>archetype:generate compile clean package <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #7a0874; font-weight: bold;">test</span>
    test-compile deploy release scala:run scala:<span style="color: #c20cb9; font-weight: bold;">cc</span>
    -Dmaven.test.skip=<span style="color: #c20cb9; font-weight: bold;">true</span>
    <span style="color: #660033;">-DarchetypeCatalog</span>=http:<span style="color: #000000; font-weight: bold;">//</span>www.scala-tools.org<span style="color: #000000; font-weight: bold;">/</span>
    <span style="color: #000000; font-weight: bold;">`</span>mainClasses<span style="color: #000000; font-weight: bold;">`</span>
    <span style="color: #000000; font-weight: bold;">`</span>mainTests<span style="color: #000000; font-weight: bold;">`</span>
    <span style="color: #660033;">-q</span> <span style="color: #660033;">-o</span>
    <span style="color: #7a0874; font-weight: bold;">&#41;</span>;
&nbsp;
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
compctl <span style="color: #660033;">-K</span> listMavenCompletions mvn<span style="color: #000000; font-weight: bold;">%</span></pre></div></div>

<p>Le script n&#8217;est pas idéal mais il permet de compléter les commandes que j&#8217;utilise le plus souvent mais aussi les <code>-Dtest=</code> et <code>-DmainClass=</code> automatiquement en listant les fichiers de l&#8217;arborescence de votre projet. L&#8217;ideal serait d&#8217;avoir une option dans maven pour lister les commandes disponibles, mais ça n&#8217;existe pas à ma connaissance.</p>
<p>Si vous utilisez d&#8217;autres commandes maven, ajouter les dans la liste <code>reply</code> (séparer par des espaces ou saut de lignes).</p>
<p>Vous pouvez copier ce script dans votre <code>~/.zshrc</code>.</p>
     ]]></content:encoded>
			<wfw:commentRss>http://www.scala-fr.org/completion-maven-pour-zsh/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Initialiser un nouveau projet Scala avec Maven 2</title>
		<link>http://www.scala-fr.org/initialiser-un-nouveau-projet-scala-avec-maven-2/</link>
		<comments>http://www.scala-fr.org/initialiser-un-nouveau-projet-scala-avec-maven-2/#comments</comments>
		<pubDate>Sun, 27 Sep 2009 16:25:36 +0000</pubDate>
		<dc:creator>Maxime Biais</dc:creator>
				<category><![CDATA[Compilation]]></category>
		<category><![CDATA[IDE]]></category>
		<category><![CDATA[emacs]]></category>
		<category><![CDATA[maven]]></category>

		<guid isPermaLink="false">http://www.scala-fr.org/?p=121</guid>
		<description><![CDATA[Introduction
Dans un précédent article, nous vous présentions sbt. Cette fois nous allons voir comment gérer un projet Scala avec maven.
Le plus simple, c&#8217;est de démarrer de zéro, et d&#8217;initialiser un projet en utilisant un archetype prédéfini. Cet archetype est un template de projet qui contient le minimum pour démarrer :

La structure de répertoire de projet
Le [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.scala-fr.org%2Finitialiser-un-nouveau-projet-scala-avec-maven-2%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.scala-fr.org%2Finitialiser-un-nouveau-projet-scala-avec-maven-2%2F" height="61" width="51" /></a></div><h1>Introduction</h1>
<p>Dans un <a href="http://www.scala-fr.org/sbt-scala-build-tool-ou-comment-compiler-son-projet-scala/">précédent article</a>, nous vous présentions sbt. Cette fois nous allons voir comment gérer un projet Scala avec <code>maven</code>.</p>
<p>Le plus simple, c&#8217;est de démarrer de zéro, et d&#8217;initialiser un projet en utilisant un archetype prédéfini. Cet archetype est un template de projet qui contient le minimum pour démarrer :</p>
<ul>
<li>La structure de répertoire de projet</li>
<li>Le pom.xml</li>
<li>Des fichiers sources quasiment vide (un main(), et un test pour scala-archetype-simple)</li>
</ul>
<h1>Initialisation d&#8217;un projet</h1>
<p>Pour l&#8217;initialisation d&#8217;un projet nous allons utiliser le plugin maven archetype (disponible dans le repository officiel de maven). Nous allons passer en paramètre de ce plugin, un lien vers une liste d&#8217;archetype : scala-tools (pour le moment, seul site à proposer des archetypes pour Scala).</p>
<pre>$ mvn archetype:generate -DarchetypeCatalog=http://scala-tools.org
    [...]
    Choose archetype:
    1: http://scala-tools.org -> scala-archetype-simple (A simple scala project)
    2: http://scala-tools.org -> lift-archetype-blank (A blank/empty liftweb project)
    3: http://scala-tools.org -> lift-archetype-basic (A basic liftweb project (with DB, css, ...))
    Choose a number:  (1/2/3): 1
</pre>
<p>Le plugin va ensuite vous posez quelques questions pour générer le pom.xml. Sélectionner le projet scala de base (1) à moins que vous soihaitiez faire du <a href="http://liftweb.net/">lift</a>.</p>
<p>Le projet ainsi initialisé contient déjà quelques dépendances et quelques plugins pratiques pour une bonne gestion d&#8217;un projet Scala :</p>
<ul>
<li>Un lien vers le repository maven de bibliothèques et de plugins Scala-tools: <a href="http://scala-tools.org/repo-releases">http://scala-tools.org/repo-releases</a></li>
<li>Une dépendance vers jUnit</li>
<li>Une dépendance vers <a href="http://code.google.com/p/specs/">specs</a></li>
<li>Le plugin <a href="http://www.scala-tools.org/mvnsites/maven-scala-plugin/">maven-scala-plugin</a></li>
</ul>
<h1>Quelques actions de maven-scala-plugin</h1>
<p>Les <em>goal</em> maven classiques sont biensûr fonctionnels (compile, package, release, &#8230;).</p>
<p>Le goal scala, propose différentes actions notamment :</p>
<ul>
<li>
<p>Lancer une application</p>
<pre>$ mvn scala:run -DmainClass=org.example.MyClass
</pre>
</li>
<li>
<p>Générer la documentation de l&#8217;API</p>
<pre>$ mvn scala:doc
</pre>
</li>
<li>
<p>Lancer le mode compilation continue (lance une boucle infinie qui compile toutes les sources qui sont sauvegardées, très pratique si vous développez avec un éditeur de texte simple type emacs ou vi)</p>
<pre>$ mvn scala:cc
</pre>
</li>
</ul>
<p><em>Note pour les utilisateurs d&#8217;emacs</em> : vous pouvez passer en compilation-mode avec <a href="http://vastusutra.blogspot.com/2007/06/getting-emacs-and-maven-2-to-play.html">cette astuce pour lancer maven</a>, puis lancer <code>mvn scala:cc</code>, je vous conseil aussi d&#8217;ajouter cette ligne dans votre .emacs.el : <code>(setq compilation-scroll-output t)</code> pour enclencher le scrolling automatique de la fenetre de compilation. Avec ça (et les ctags pour la complétion), vous pouvez jeter Eclipse et NetBeans <img src='http://www.scala-fr.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> . Vous pouvez aussi utiliser le flymake-mode beaucoup plus pratique mais malheuresement un peu lent à cause de l&#8217;utilisation de maven en arrière plan.</p>
<p>Je n&#8217;ai rien contre Eclipse ou Netbeans, mais mon process emacs ne dépasse jamais 30Mo de RAM et il ne s&#8217;arrête pas inopinément.</p>
<p>Plus de détails sur la page de <a href="http://www.scala-tools.org/mvnsites/maven-scala-plugin/usage.html">documentation de maven-scala-plugin</a>.</p>
<h1>Ajouter des dépendances</h1>
<p>C&#8217;est du maven classique. Pour ajouter une dépendance, éditer votre fichier <code>pom.xml</code> et ajouter les groupId / artifactId / version dont vous avez besoin dans <code>project->dependencies</code>. Si je veux par exemple ajouter la dépendance vers scalacheck, il me suffit d&#8217;ajouter :</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dependencies<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
[...] 
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;dependency<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;groupid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>org.scala-tools.testing<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/groupid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span> 
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;artifactid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>scalacheck<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/artifactid<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>1.5<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dependency<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
[...]
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/dependencies<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>Note : ScalaCheck est disponible sur le repository maven scala-tools (ajouté par défaut à l&#8217;initiation du projet avec l&#8217;archetype scala-archetype-simple).</p>
<h1>Démonstration</h1>
<p>Une démonstration de l&#8217;utilisation de mvn dans emacs, en utilisant <code>mvn archetype:generate</code> pour initialiser un projet exemple.</p>
<p><object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/M9sFtoFzl3w&#038;hl=en&#038;fs=1&#038;rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/M9sFtoFzl3w&#038;hl=en&#038;fs=1&#038;rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object></p>
     ]]></content:encoded>
			<wfw:commentRss>http://www.scala-fr.org/initialiser-un-nouveau-projet-scala-avec-maven-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>sbt : Scala Build Tool ou comment compiler son projet Scala</title>
		<link>http://www.scala-fr.org/sbt-scala-build-tool-ou-comment-compiler-son-projet-scala/</link>
		<comments>http://www.scala-fr.org/sbt-scala-build-tool-ou-comment-compiler-son-projet-scala/#comments</comments>
		<pubDate>Fri, 25 Sep 2009 16:50:34 +0000</pubDate>
		<dc:creator>Maxime Biais</dc:creator>
				<category><![CDATA[Compilation]]></category>
		<category><![CDATA[sbt]]></category>

		<guid isPermaLink="false">http://www.scala-fr.org/?p=116</guid>
		<description><![CDATA[Introduction
sbt signifie Scala Build Tool. Encore un outils de compilation ? ant, maven ne suffisent pas ?
sbt se veut non intrusif : vous pouvez l&#8217;utiliser sans modifier la disposition de votre projet, uniquement en modifiant un descripteur (ce descripteur est écrit en Scala, un peu comme scons pour Python ou rake en Ruby). Pour cela [...]]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;"><a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.scala-fr.org%2Fsbt-scala-build-tool-ou-comment-compiler-son-projet-scala%2F"><img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.scala-fr.org%2Fsbt-scala-build-tool-ou-comment-compiler-son-projet-scala%2F" height="61" width="51" /></a></div><h1>Introduction</h1>
<p><code>sbt</code> signifie Scala Build Tool. Encore un outils de compilation ? <code>ant</code>, <code>maven</code> ne suffisent pas ?</p>
<p><code>sbt</code> se veut non intrusif : vous pouvez l&#8217;utiliser sans modifier la disposition de votre projet, uniquement en modifiant un descripteur (ce descripteur est écrit en Scala, un peu comme <code>scons</code> pour Python ou <code>rake</code> en Ruby). Pour cela il se base sur le même format de projet que <code>maven</code>.</p>
<pre>src/
  main/
    resources/  # Fichiers à inclure dans le jar principal
    scala/      # Sources Scala
    java/       # Sources Java
  test/
    resources   # Fichiers à inclire dans le jar de test
    scala/      # Sources de Test Scala
    java/       # Sources de Test Java
</pre>
<p>Son principal intérêt est d&#8217;intégrer des outils liés à Scala sans avoir besoin de configurer quoique ce soit:</p>
<ul>
<li>Génération de documentation avec scaladoc.</li>
<li>Tests unitaires avec ScalaTest.</li>
<li>Génération de tests unitaires avec ScalaCheck.</li>
<li>Intégration de specs, framework de <a href="http://fr.wikipedia.org/wiki/Behavior_Driven_Development">behavior driven development</a>.</li>
</ul>
<p>sbt se base sur maven par défaut pour gérer les dépendances.</p>
<h1>Installer sbt</h1>
<p>Malheuresement sbt n&#8217;est pas packagé dans <code>sbaz</code>. Il vous faudra le télécharger et l&#8217;installer à la main.</p>
<p>Pour cela, rien de plus simple, télécharger la dernière version de <em>sbt-launcher.jar</em> sur la <a href="http://code.google.com/p/simple-build-tool/downloads/list">page de téléchargement de sbt</a>.</p>
<p>Puis créer un script shell dans votre PATH, chez moi ça donne ça :</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">$ echo $PATH
/sw/bin:/sw/sbin:/Users/max/dist/sbin
$ wget http://simple-build-tool.googlecode.com/files/sbt-launcher-0.5.4.jar -O /Users/max/dist/sbin/sbt-launcher.jar
$ echo 'java -Xmx512M -jar `dirname $0`/sbt-launcher.jar &quot;$@&quot;' &gt; /Users/max/dist/sbin/sbt
$ chmod +x /Users/max/dist/sbin/sbt</pre></div></div>

<p><code>sbt</code> est installé, vous pouvez le l&#8217;utiliser.</p>
<h1>Utiliser sbt</h1>
<p><code>sbt</code> se lance en mode interactif ou en mode batch. Le mode batch permet de lancer une suite de tâches les unes à la suite des autres. Le mode interactif lance un shell particulier vous permettant de taper des commandes particulières (tâches ou autres).</p>
<p>Lorsque vous lancer <code>sbt</code> dans un répertoire qui ne contient pas les descripteurs, il va vous proposer de créer une structure de projet.</p>
<h2>Créer un projet</h2>
<p>Lancer sbt sans arguments dans le répertoire où vous souhaitez créer votre projet:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">$ mkdir sbttest
$ sbt
Project does not exist, create new project? (y/N/s) : y
Name: SbtTest
Organization []: scala-fr
Version [1.0]: 
Scala version [2.7.5]: 
sbt version [0.5.3]: 
[...]
[success] Successfully initialized directory structure.</pre></div></div>

<p>Voilà, la structure de projet est créée, voici à quoi elle ressemble : </p>
<pre>$ \tree
|-- lib
|-- project
|   |-- boot
|   |   `-- scala-2.7.5
|   |       |-- lib
|   |       |   |-- scala-compiler.jar
|   |       |   `-- scala-library.jar
|   |       |-- sbt-0.5.3
|   |       |   |-- ivy-2.0.0.jar
|   |       |   |-- jsch-0.1.31.jar
|   |       |   `-- sbt_2.7.5-0.5.3.jar
|   |       `-- update.log
|   `-- build.properties
|-- src
|   |-- main
|   |   |-- resources
|   |   `-- scala
|   `-- test
|       |-- resources
|       `-- scala
`-- target
</pre>
<h2>Mode interactif</h2>
<p>Si vous le lancer sans arguments dans un répertoire projet, il démarre en mode interactif:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">$ sbt
[info] Building project xxx 0.1 using XXX
[info]    with sbt 0.4.6 and Scala 2.7.4
[info] No actions specified, interactive session started. Execute 'help' for more information.
&gt;</pre></div></div>

<p>Un shell sbt est ouvert, vous pouvez tapez vos commandes. </p>
<h2>Mode batch</h2>
<p>En mode batch vous lancer directement les tâches (Consulter <a href="http://code.google.com/p/simple-build-tool/wiki/RunningSbt">la liste exhaustive des tâches</a>)</p>
<p>Exemple, je viens d&#8217;écrire du code (un simple <code>println("hey !")</code>dans le fichier <code>src/main/scala/sbttest.scala</code>, je lance la tâche <code>run</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">$ sbt run
[info] Building project SbtTest 1.0 using sbt.DefaultProject
[info]    with sbt 0.5.3 and Scala 2.7.5
...
[info] == compile ==
...
[info] == run ==
[info] Running RunSbtTest ...
hey !
...
[info] Total build time: 1 s</pre></div></div>

<p>On s&#8217;aperçoit que la tâche <code>run</code> dépend de la tâche <code>compile</code>, et ça tombe bien <img src='http://www.scala-fr.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> . Vous venez de compiler et de lancer votre premier projet Scala avec sbt et son projet par défaut (sbt.DefaultProject).</p>
<h1>Conclusion</h1>
<p>Ca sera tout pour cet article, il y a pas mal de possibilités qui n&#8217;ont pas été abordées ici. Elles le seront sûrement un peu plus en détails dans les futurs articles.</p>
<p>En apparence <code>sbt</code> simplifie tout. Pour les projets Scala simple, il sera sûrement parfaitement adapté, mais dès que vous commencez à dévier du chemin classique, ça devient plus complexe et mal documenté; c&#8217;est là que les ennuis commencent.</p>
<p>Même si vous avez l&#8217;habitude, et préférez utiliser maven; si vous êtes développeur Scala, vous aurez sûrement besoin d&#8217;installer sbt pour compiler des projets tiers. Ce sera une bonne occasion pour apprendre quelques commandes, le tester et vous en faire votre opinion.</p>
<p>En savoir plus:</p>
<ul>
<li>Différents modes d&#8217;installation : <a href="http://code.google.com/p/simple-build-tool/wiki/Setup">How to setup sbt</a></li>
<li>Utilisation : <a href="http://code.google.com/p/simple-build-tool/wiki/RunningSbt">Basic usage</a></li>
<li>Aller plus loin dans la mise en place de vos propre option de build: <a href="http://code.google.com/p/simple-build-tool/wiki/BuildConfiguration">Build Configuration</a></li>
</ul>
     ]]></content:encoded>
			<wfw:commentRss>http://www.scala-fr.org/sbt-scala-build-tool-ou-comment-compiler-son-projet-scala/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
