<?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>Blog de Salvador Diaz &#187; GWT</title>
	<atom:link href="http://blog.salvadordiaz.fr/category/google/gwt/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.salvadordiaz.fr</link>
	<description>Encore un blog de geek...</description>
	<lastBuildDate>Sun, 29 Aug 2010 15:33:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Confier mes données à  Google ? Jamais !</title>
		<link>http://blog.salvadordiaz.fr/2010/04/10/secure-data-connector/</link>
		<comments>http://blog.salvadordiaz.fr/2010/04/10/secure-data-connector/#comments</comments>
		<pubDate>Sat, 10 Apr 2010 11:08:27 +0000</pubDate>
		<dc:creator>salvador</dc:creator>
				<category><![CDATA[GAE]]></category>
		<category><![CDATA[GWT]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[AppEngine]]></category>
		<category><![CDATA[SDC]]></category>
		<category><![CDATA[wave]]></category>

		<guid isPermaLink="false">http://blog.salvadordiaz.fr/?p=75</guid>
		<description><![CDATA[Dans ce post je vais vous montrer comment mettre en place cette solution de bout en bout: crÃ©ation de votre application App Engine, installation et configuration de l'agent SDC (ce qui est installÃ© sur le serveur dans votre intranet) et activation du SDC dans le tableau de bord de votre domaine Google Apps. ]]></description>
			<content:encoded><![CDATA[<p>Ce post est écrit sur Google Wave et inséré ici et sur InsideIT.fr le blog de mon employeur.</p>
<p>Exporter un Wave de cette façon est très simple et <a title="Wave Embed API" href="http://code.google.com/apis/wave/embed/index.html" target="_blank">documenté à  plusieurs endroits</a>, merci à  Olivier Croisier pour <a title="L'article d'Olivier Croisier" href="http://thecodersbreakfast.net/index.php?post/2010/01/24/Google-Wave-Embedded-API-:-the-missing-tutorial" target="_blank">son post</a> qui explique comment exporter une Wave non pas depuis la <a title="Wave Sandbox" href="http://wave.google.com/a/wavesandbox.com" target="_blank">sandbox</a> mais depuis<a title="Google Wave" href="http://wave.google.com" target="_blank"> le serveur &#8220;grand public&#8221;</a>.</p>
<div id="waveframe" style="width: 100%; height: 100%;">-</div>
<p><script src="http://wave-api.appspot.com/public/embed.js" type="text/javascript"></script> <script type="text/javascript">// <![CDATA[
    var wavePanel = new WavePanel('http://wave.google.com/wave/');
    wavePanel.loadWave('googlewave.com!w+cX69umTlA');
    wavePanel.setUIConfig('white', 'black', 'Arial', '12pt');
    wavePanel.init(document.getElementById('waveframe'));
// ]]&gt;</script></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.salvadordiaz.fr/2010/04/10/secure-data-connector/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Keep your source tree clean ! Maven workarounds for GWT 1.6</title>
		<link>http://blog.salvadordiaz.fr/2009/04/29/keep-your-source-tree-clean-gwt/</link>
		<comments>http://blog.salvadordiaz.fr/2009/04/29/keep-your-source-tree-clean-gwt/#comments</comments>
		<pubDate>Wed, 29 Apr 2009 16:10:23 +0000</pubDate>
		<dc:creator>salvador</dc:creator>
				<category><![CDATA[GWT]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[GEP]]></category>
		<category><![CDATA[m2eclipse]]></category>

		<guid isPermaLink="false">http://blog.salvadordiaz.fr/?p=5</guid>
		<description><![CDATA[In this series of posts I'll analyze the current conflicts between the new Google Eclipse Plugin (also know as GEP), maven and the gwt-maven-plugin. Once these conflicts are identified, I'll try to find workarounds and advice on what possible perennial solutions could be implemented by each team. This first post is directed at the impatient crowd, the ones looking for a copy-paste solution]]></description>
			<content:encoded><![CDATA[<p>In this series of posts I&#8217;ll analyze the current conflicts between the new <a title="Google Eclipse Plugin" href="http://code.google.com/eclipse/" target="_blank">Google Eclipse Plugin</a> (also know as GEP), <a title="Official Maven Site" href="http://maven.apache.org" target="_blank">maven</a> and the <a title="gwt-maven-plugin from the Mojo Project at Codehaus" href="http://mojo.codehaus.org/gwt-maven-plugin/1.1-SNAPSHOT/" target="_blank">gwt-maven-plugin</a>. Once these conflicts are identified, I&#8217;ll try to find workarounds and advice on what possible perennial solutions could be implemented by each team. This first post is directed at the impatient crowd, the ones looking for a copy-paste solution (you do know that&#8217;s <a title="Best Practices" href="http://www.stevemcconnell.com/ieeesoftware/bp16.htm" target="_blank">bad practice</a>, don&#8217;t you ?) so I&#8217;ll be as brief as I can and give as little detail as I can to get you started using GWT with Eclipse, the Google Eclipse Plugin and the gwt-maven-plugin. For those of you who don&#8217;t mind reading long posts and want to understand exactly what&#8217;s keeping these 4 tools from working together and how I came up with the workarounds explained here, check back soon(ish), the following posts will be a lot more detailed.</p>
<h2>Introduction</h2>
<p>The Google Web Toolkit team <a title="Introducing GWT 1.6 and friends" href="http://googlewebtoolkit.blogspot.com/2009/04/introducing-gwt-16-and-friends.html" target="_blank">announced the release of GWT 1.6.4</a> a couple of weeks ago (for those keeping track, that&#8217;s roughly 6 months after the <a title="Release Notes for 1.5.3" href="http://code.google.com/webtoolkit/releases/release-notes-1.5.3.html" target="_blank">1.5.3 release</a> and 13 months after the <a title="Release Notes for 1.4.62" href="http://code.google.com/webtoolkit/releases/release-notes-1.4.62.html" target="_blank">1.4 release</a>). I&#8217;m not going to describe here at length the improvements brought by this new version, you can read all about it in the <a title="GWT 1.6 Release Notes" href="http://code.google.com/webtoolkit/doc/1.6/ReleaseNotes_1_6.html" target="_blank">release notes</a> and the new and improved <a title="GWT Developer's Guide" href="http://code.google.com/webtoolkit/doc/1.6/DevGuide.html" target="_blank">developer documentation</a>. Instead I&#8217;m going to focus on one of the changes that has caused a great deal of frustration to us GWT developers relying on maven to automate the build process: the new <a title="New project structure" href="http://code.google.com/p/google-web-toolkit/wiki/WAR_Design_1_6" target="_blank">war project structure</a>.</p>
<p><a title="Discussion about the new project structure" href="http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/791832a0e177e87e/47f59f8226133a91" target="_blank">So what&#8217;s the problem with the new project structure ?</a> If you use GWT for a personal project and you&#8217;re the only person modifying your source you should be fine because it&#8217;s relatively trivial to keep your source files separated from generated files. The problem really arises when your project is shared between a whole team (typically on a <a title="Version Control System Definition" href="http://en.wikipedia.org/w/index.php?title=Version_control_system" target="_blank">version control system</a>): in that case you&#8217;ll really want to keep your original source and resources files separated from generated files and that&#8217;s precisely the problem with the new GWT project structure, it assumes that server-side library dependencies must be copied into <code>/war/WEB-INF/lib</code> and that the java compiler outputs to <code>/war/WEB-INF/classes</code> (<a title="Why the new war structure could be dangerous" href="http://groups.google.com/group/Google-Web-Toolkit/msg/589178efeab9742b">thus polluting the war folder</a>).</p>
<h2>The solution</h2>
<p>How do you configure Eclipse, maven and the gwt-maven-plugin to work with GWT 1.6.4 then ? I&#8217;ll start from scratch with the archetype from the gwt-maven-plugin-1.1-SNAPSHOT and I&#8217;ll guide you step by step in the pom and eclipse configuration. In the end, you&#8217;ll be able to develop your GWT application with Eclipse, taking advantage of the <a title="Debugging with Hosted Mode" href="http://code.google.com/webtoolkit/doc/1.6/DevGuideCompilingAndDebugging.html#DevGuideHostedMode" target="_blank">hosted mode for debugging</a>, you&#8217;ll have a clean source tree, and you&#8217;ll be able to <a title="War packaging with maven" href="http://maven.apache.org/plugins/maven-war-plugin/war-mojo.html" target="_blank">package your application as a war</a>. Unfortunately, I still haven&#8217;t found a way to <a title="Running as Web Application with the GEP" href="http://code.google.com/eclipse/docs/running_and_debugging.html" target="_blank">launch as a Google Web Application</a> (the custom launcher provided by the GEP) and the warnings about <a title="Client-side code" href="http://code.google.com/webtoolkit/doc/1.6/DevGuideCodingBasics.html#DevGuideClientSide" target="_blank">unavailable classes in client-side code</a> don&#8217;t seem to be working, effectively making the GEP almost useless. Fortunately the hosted mode will warn you about unavailable client-side classes and we don&#8217;t need the GEP to launch the hosted mode so pretty much all of the GEP functionality is there, only without the GEP.</p>
<p>So without further ado, here&#8217;s what you need to run and develop GWT applications with Eclipse, maven and the Google Eclipse Plugin (ok that last one doesn&#8217;t do anything useful yet in this configuration, but at least it can be activated).</p>
<h3>Prerequisites</h3>
<ul>
<li>A working <a title="Maven installation" href="http://maven.apache.org/download.html#Installation" target="_blank">maven 2.1.0 installation</a> (I&#8217;ve used 2.1.0 to write this guide but I&#8217;ve tested in 2.0.9 and it works, and it should work on any 2.x version, let me know in the comments if you tried any other version)</li>
<li><a title="Download Eclipse 3.4 JavaEE Edition" href="http://www.eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/ganymedesr2">Eclipse 3.4 JavaEE edition</a> (again, drop me a comment if you succeed with another Eclipse version/edition)</li>
<li>A working <a title="Installing the Google Eclipse Plugin" href="http://code.google.com/appengine/docs/java/tools/eclipse.html#Installing_the_Google_Plugin_for_Eclipse" target="_blank">installation of the Google Eclipse Plugin</a>.</li>
<li>The glue that holds the pieces together: the <a title="Installing m2eciipse" href="http://m2eclipse.codehaus.org/" target="_blank">m2eclipse plugin</a> (Maven Integration for Eclipse)</li>
</ul>
<h3>Project creation with gwt-maven-plugin</h3>
<ul>
<li>To create a GWT project with the gwt-maven-plugin, just open a command line, change the working directory to the location where you want to create your project (typically the location of your eclipse workspace) and type the following <a title="gwt-maven-plugin archetype example" href="http://snipplr.com/view/14532/gwtmavenplugin-archetype-creation-example/" target="_blank">command</a>. You&#8217;ll end up with a folder called &#8220;maven-example&#8221;<a title="gwt-maven-plugin archetype example" href="http://snipplr.com/view/14532/gwtmavenplugin-archetype-creation-example/" target="_blank"> </a></li>
<li>Fire up Eclipse and import the project we just created (&#8220;File&#8221; &gt; &#8220;Import&#8221; &gt; &#8220;Maven projects&#8221; &gt; &#8220;Browse&#8221; and browse to the &#8220;maven-example&#8221; folder and click &#8220;Finish&#8221;).
<div class="wp-caption aligncenter" style="width: 395px"><a href="http://bayimg.com/image/japagaabg.jpg" target="_blank"><img src="http://bayimg.com/image/japagaabg.jpg" alt="Importing the created project into the workspace" width="385" height="390" /></a><p class="wp-caption-text">Importing the created project into the workspace</p></div>
<p>You&#8217;ll end up with a project which looks like this in your workspace.</p>
<p><div class="wp-caption aligncenter" style="width: 197px"><a href="http://bayimg.com/image/japahaabg.jpg" target="_blank"><img src="http://bayimg.com/image/japahaabg.jpg" alt="Project structure" width="187" height="305" /></a><p class="wp-caption-text">Project structure</p></div></li>
</ul>
<h3>POM configuration (maven build configuration)</h3>
<ul>
<li>Open the pom.xml file, it will look like <a title="Original pom" href="http://snipplr.com/view/14538/pom-created-by-gwtmavenplugin11snapshot-archetype/" target="_blank">this</a>. Modify it to look like <a title="Modified pom" href="http://snipplr.com/view/14539/modified-pom-for-gwt-164/" target="_blank">this</a>.</li>
</ul>
<h3>GWT module tweak</h3>
<ul>
<li>Add a <a title="GWT Module declaration" href="http://snipplr.com/view/14573/gwt-module-declaration-with-renameto-attribute/" target="_blank">rename-to</a> attribute to the GWT module declaration file.</li>
<li>Change the Application.html file to look like <a title="Modified GWT HTML host page " href="http://snipplr.com/view/14608/modified-gwt-html-host-page/" target="_blank">this</a>. Move that file to the <code>src/main/webapp</code> folder.</li>
<li>Delete the file named <code>index.html</code> located in the <code>src/main/webapp</code> folder.</li>
<li>Open the <code>web.xml</code> file located in <code>src/main/webapp/WEB-INF</code> and change the value of the <code>welcome-file</code> to <code>Application.html</code>.</li>
</ul>
<h3>m2eclipse plugin configuration</h3>
<ul>
<li>Global configuration (&#8220;Window &gt; Preferences &gt; Maven&#8221; or &#8220;Command+,&#8221;): no goals should be executed neither on project import nor when updating project configuration.
<p><div class="wp-caption aligncenter" style="width: 373px"><a href="http://bayimg.com/image/japajaabg.jpg" target="_blank"><img src="http://bayimg.com/image/japajaabg.jpg" alt="Global m2eclipse configuration" width="363" height="256" /></a><p class="wp-caption-text">Global m2eclipse configuration</p></div></li>
<li>Project-level configuration  (Right click on project &gt; Properties &gt; Maven): <code>clean compile</code> goals on project clean and <del datetime="2009-05-03T12:38:20+00:00">on resources change</del> <code>compile</code> on resources change.
<p><div class="wp-caption aligncenter" style="width: 441px"><a href="http://bayimg.com/image/happmaabg.jpg" target="_blank"><img src="http://bayimg.com/image/happmaabg.jpg" alt="Project-level m2eclipse configuration" width="431" height="268" /></a><p class="wp-caption-text">Project-level m2eclipse configuration</p></div></li>
</ul>
<h3>Eclipse project configuration</h3>
<ul>
<li>Check the &#8220;Allow output folders for source folders&#8221; option in the &#8220;Java Build Path&#8221; panel under the &#8220;Project Properties&#8221; dialog.</li>
<li><del datetime="2009-05-03T12:38:20+00:00">Change output folders for <code>src/main/java</code>, <code>src/main/resources</code> and &#8220;Default output folder&#8221; to <code>maven-example/target/gwt/WEB-INF/classes.</code></del> Updating project configuration in m2eclipse context menu option should do it automatically.
<p><div class="wp-caption aligncenter" style="width: 461px"><a href="http://bayimg.com/image/japalaabg.jpg" target="_blank"><img src="http://bayimg.com/image/japalaabg.jpg" alt="Modified Java Build Path" width="451" height="263" /></a><p class="wp-caption-text">Modified Java Build Path</p></div></li>
<li>Create a launcher for hosted mode debugging (Open the &#8220;Debug configurations&#8221; dialog in the &#8220;Run&#8221; menu): click the links for screenshots of the <a title="Main tab" href="http://bayimg.com/image/japamaabg.jpg" target="_blank">&#8220;Main&#8221; tab</a>, the <a title="Arguments tab" href="http://bayimg.com/image/japaoaabg.jpg" target="_blank">&#8220;Arguments&#8221; tab</a>, the <a title="Classpath tab" href="http://bayimg.com/image/kapafaabg.jpg" target="_blank">&#8220;Classpath&#8221; tab</a> and the <a title="Advanced dialog" href="http://bayimg.com/image/japapaabg.jpg" target="_blank">steps to</a> <a title="Folders to add to classpath" href="http://bayimg.com/image/kapadaabg.jpg" target="_blank">add folders</a> and <a title="External jar to add" href="http://bayimg.com/image/kapaeaabg.jpg" target="_blank">external jars</a> to the classpath (note that the gwt-dev jar name depends on your OS).</li>
</ul>
<h2>The results</h2>
<p>The end result is a working GWT project with the following characteristics:</p>
<ul>
<li>Can be developed (code &#8211; debug &#8211; compile) entirely in Eclipse (hosted mode works fine for compiling and debugging) just like with the GEP.</li>
<li>Can be packaged automatically by maven (type <code>mvn package</code> to get a war in the target directory).</li>
<li>The source tree is completely separated from generated artifacts, allowing for an easiest experience for developers working with VCSs.</li>
<li>Follows maven conventions (and everybody knows that <a title="Why you should follow conventions" href="http://blogs.msdn.com/steverowe/archive/2005/09/28/475036.aspx" target="_blank">conventions are good</a>).</li>
</ul>
<p>What you don&#8217;t get:</p>
<ul>
<li>Google App Engine application development (outside the scope of this guide).</li>
<li>Warnings about unavailable classes in client-side GWT code (You&#8217;ll get them on the hosted mode console though).</li>
<li>Right-click &gt; Run as Google Web Application (Google&#8217;s fancy launchers don&#8217;t seem to like the separation between sources and resources so they won&#8217;t launch our application)</li>
</ul>
<p>I think it&#8217;s a pretty good compromise if you&#8217;re looking forward to use GWT 1.6 in a maven environment, pretty much all of the functionality of GEP is there AND you are following the maven way. There are a few strange behaviors in some corner cases, so come back later for the follow-up to this post where I&#8217;ll explain in detail how I found this workarounds, how these tools work together and how to troubleshoot any problems that you&#8217;ll be kind enough to report in the comments.</p>
<p><strong>Edit 1 (03/may/2009):</strong></p>
<p>Thanks to <a title="Eugene's blog" href="http://jroller.com/eu/" target="_blank">Eugene Kuleshov</a> for his contribution (see first comment). The Eclipse buildpath configuration is now automatically handled by m2eclipse.</p>
<p>If you tried this tutorial before this edit, you should have spotted a <a title="Bug report in m2eclipse issue tracker" href="https://issues.sonatype.org/browse/MNGECLIPSE-1136" target="_blank">bug in m2eclipse</a> that stopped the copy-resources goal from the maven-resources-plugin from working. Try the <a title="Latest pom version" href="http://snipplr.com/view/14539/modified-pom-for-gwt-164/" target="_blank">latest version of the pom</a> and make sure the project level configuration for m2eclipse is correct (check <a title="Modified m2eclipse project-level configuration" href="http://bayimg.com/image/happmaabg.jpg" target="_blank">the screenshot</a>).</p>
<p><strong>Update 2 (october 5th 2009):</strong></p>
<p>I haven&#8217;t had the time to fully update this tutorial, but from what I can read in the comments, this should also work with GWT 1.7 (do read the comments if you&#8217;re attempting to get it working).</p>
<p><strong>Update 3 (october 23th 2009):</strong></p>
<p>As the last commenters noted, all the screenshots are dead, I thought it&#8217;d be more reliable to store them on bayimg.com than in my own server but they proved me wrong. I&#8217;ll try to reupload them this weekend but in the meantime you can download a zip with all the screenshots by <a href="http://dl.getdropbox.com/u/70140/maven-gwt.zip" target="_blank">clicking here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.salvadordiaz.fr/2009/04/29/keep-your-source-tree-clean-gwt/feed/</wfw:commentRss>
		<slash:comments>45</slash:comments>
		</item>
	</channel>
</rss>

