<?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>EclipseSource Blog &#187; hudson</title>
	<atom:link href="http://eclipsesource.com/blogs/tag/hudson/feed/" rel="self" type="application/rss+xml" />
	<link>http://eclipsesource.com/blogs</link>
	<description>Eclipse Equinox OSGi</description>
	<lastBuildDate>Fri, 18 May 2012 15:00:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>How to build a RAP application with Tycho</title>
		<link>http://eclipsesource.com/blogs/2011/01/17/how-to-build-a-rap-application-with-tycho/</link>
		<comments>http://eclipsesource.com/blogs/2011/01/17/how-to-build-a-rap-application-with-tycho/#comments</comments>
		<pubDate>Mon, 17 Jan 2011 12:21:45 +0000</pubDate>
		<dc:creator>Holger Staudacher</dc:creator>
				<category><![CDATA[eclipse]]></category>
		<category><![CDATA[syndicate]]></category>
		<category><![CDATA[build]]></category>
		<category><![CDATA[hudson]]></category>
		<category><![CDATA[indigo]]></category>
		<category><![CDATA[jenkins]]></category>
		<category><![CDATA[rap]]></category>
		<category><![CDATA[tycho]]></category>

		<guid isPermaLink="false">http://eclipsesource.com/blogs/?p=5195</guid>
		<description><![CDATA[Recently I played around a little with Tycho because we evaluated it for the use in the RTP project. As a test case, I decided to try to build a RAP application with Tycho. With building I mean compiling and packaging the artifacts into a WAR file in order to deploy them on a Tomcat or another [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;">Recently I played around a little with <a href="http://eclipse.org/tycho">Tycho</a> because we evaluated it for the use in the <a href="http://www.eclipse.org/proposals/rt-packaging/">RTP project</a>. As a test case, I decided to try to build a <a href="http://eclipse.org/rap">RAP</a> application with Tycho. With building I mean compiling and packaging the artifacts into a WAR file in order to deploy them on a Tomcat or another Servlet Container.</p>
<p style="text-align: left;">I have to say that I&#8217;m really impressed with Tycho. Before this experience, <a href="http://maven.apache.org/">Maven</a> was the &#8220;bad thing that downloads the internet&#8221; to me. Okay, it still downloads the internet but in this case it&#8217;s very useful. You can add <a href="http://eclipse.org/equinox/p2/">p2</a> repositories to resolve dependencies and it automatically downloads the right bundles. You can define the dependencies in your MANIFEST.MF and use the pom.xml to describe what kind of package it is, e.g. a feature or bundle. For building the RAP application, I just had to add the <a href="http://download.eclipse.org/releases/helios/">Helios p2 repository</a> to solve all my feature&#8217;s dependencies.</p>
<table style="text-align: center;" align="center">
<tbody>
<tr>
<td><a href="http://eclipse.org/rap"><img class="aligncenter size-full wp-image-5235" title="RAP-Logo" src="http://eclipsesource.com/blogs/wp-content/uploads/2011/01/RAP-Logo.png" alt="RAP Logo How to build a RAP application with Tycho" width="313" height="136" /></a></td>
<td><a href="http://eclipse.org/tycho"><img class="aligncenter size-full wp-image-5236" title="tycho-logo" src="http://eclipsesource.com/blogs/wp-content/uploads/2011/01/tycho-logo.png" alt="tycho logo How to build a RAP application with Tycho" width="150" height="147" /></a></td>
</tr>
</tbody>
</table>
<p style="text-align: left;">Now, you might want to know how to build the application with Tycho yourself. I published the code on github [1]. It&#8217;s just the example Mail application and a sample feature that can be built with Tycho. Follow the README instructions to run the build. Here are a few notes you might need if you want to use this configuration as a template for your own build:</p>
<ol>
<li>Edit the feature.xml from com.eclipsesource.maildemo.tycho.feature, adding your dependencies.</li>
<li>The build uses a static configuration.ini. As a result, you have to edit the configuration manually and add your own bundles. You will find the configuration.ini in the com.eclipsesource.maildemo.tycho.feature feature in the templates/WEB-INF/eclipse/configuration folder.</li>
<li>Create a pom.xml for every bundle you created with the following content:

<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;?xml</span> <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;UTF-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;project</span> <span style="color: #000066;">xsi:schemaLocation</span>=<span style="color: #ff0000;">&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd&quot;</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://maven.apache.org/POM/4.0.0&quot;</span></span>
<span style="color: #009900;">    <span style="color: #000066;">xmlns:xsi</span>=<span style="color: #ff0000;">&quot;http://www.w3.org/2001/XMLSchema-instance&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;modelVersion<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>4.0.0<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/modelVersion<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;parent<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>maildemo<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;groupId<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>com.eclipsesource<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;version<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>0.0.1-SNAPSHOT<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;/parent<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>com.eclipsesource<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>com.eclipsesource.maildemo.tycho<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.0.0-SNAPSHOT<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;packaging<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>eclipse-plugin<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/packaging<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/project<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

</li>
<li>Change the artifactId from com.eclipsesource.maildemo.tycho to your own Id.  You&#8217;ll also need to change the parentId when you use your own Id.</li>
<li>Edit the pom.xml in the parent folder and add your modules. To add modules you just need to add the folder names from the different bundles to the file.</li>
<li>In the pom.xml of the feature, change the naming of the &#8220;maildemo&#8221; to create a .war file with the name of your choice.</li>
<li>Of course you can use your own groupIds and artifactIds. But, you have to reference the parent pom.xml artifactId in every bundle&#8217;s pom.xml</li>
</ol>
<p style="text-align: left;">I hope these steps and the example build will help you to create your own Tycho based builds for RAP applications. Maybe you have some experiences or ideas you&#8217;d like to share?  Please feel free to post comments.</p>
<p style="text-align: left;">[1] <a href="https://github.com/hstaudacher/org.eclipse.rap.build.examples">https://github.com/hstaudacher/org.eclipse.rap.build.examples</a></p>
]]></content:encoded>
			<wfw:commentRss>http://eclipsesource.com/blogs/2011/01/17/how-to-build-a-rap-application-with-tycho/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Google Summer of Code 2010 is on!</title>
		<link>http://eclipsesource.com/blogs/2010/04/27/google-summer-of-code-2010-is-on/</link>
		<comments>http://eclipsesource.com/blogs/2010/04/27/google-summer-of-code-2010-is-on/#comments</comments>
		<pubDate>Mon, 26 Apr 2010 22:00:40 +0000</pubDate>
		<dc:creator>Benjamin Muskalla</dc:creator>
				<category><![CDATA[eclipse]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[syndicate]]></category>
		<category><![CDATA[ecf]]></category>
		<category><![CDATA[egit]]></category>
		<category><![CDATA[emf]]></category>
		<category><![CDATA[equinox]]></category>
		<category><![CDATA[gmf]]></category>
		<category><![CDATA[google summer of code]]></category>
		<category><![CDATA[hudson]]></category>
		<category><![CDATA[mylyn]]></category>
		<category><![CDATA[rap]]></category>
		<category><![CDATA[restlet]]></category>
		<category><![CDATA[wave]]></category>

		<guid isPermaLink="false">http://eclipsesource.com/blogs/?p=4041</guid>
		<description><![CDATA[Finally the voting process for this years Google Summer of Code is over and they announced the accepted students. I&#8217;m really happy that so many interesting proposals got trough and really looking forward to see the outcome of all the student projects. Here is the full list of the proposals that got accepted for 2010. [...]]]></description>
			<content:encoded><![CDATA[<p>Finally the voting process for this years Google Summer of Code is over and they <a href="http://google-opensource.blogspot.com/2010/04/this-years-google-summer-of-code.html">announced</a> the accepted students. I&#8217;m really happy that so many interesting proposals got trough and really looking forward to see the outcome of all the student projects.</p>
<p><a href="http://code.google.com/soc"><img class="size-full wp-image-4042 alignnone" style="border: 0px initial initial;" title="Google Summer of Code 2010" src="http://eclipsesource.com/blogs/wp-content/uploads/2010/04/gsoc2010.jpeg" alt=" Google Summer of Code 2010 is on!" width="200" height="178" /></a></p>
<p>Here is the full list of the proposals that got accepted for 2010.<br />
<strong>Improve Eclipse Git integration</strong><br />
Student: Dariusz Luksza<br />
Mentor(s): Matthias Sohn</p>
<p><strong>WAR deployment for RAP/Equinox based applications</strong><br />
Student: Holger Staudacher<br />
Mentor(s): Ruediger Herrmann</p>
<p><strong>Theme editor for RAP</strong><br />
Student: Benjamin Muskalla (IRC: benny`work)<br />
Mentor(s): Ruediger Herrmann</p>
<p><strong>Rich Editor For Wiki Markup</strong><br />
Student: Harshana Eranga Martin<br />
Mentor(s): David Green</p>
<p><strong>index based model compare match engine</strong><br />
Student: Stefan Leopold<br />
Mentor(s): Cedric Brun</p>
<p><strong>Restlet integration with Equinox</strong><br />
Student: Rajeev Sampath<br />
Mentor(s): Bryan Hunt</p>
<p><strong>C++ editor enhancements</strong><br />
Student: Tomasz Wesolowski<br />
Mentor(s): Alena Laskavaia</p>
<p><strong>DNS-SD based wide-area ECF discovery provider</strong><br />
Student: Markus Alexander Kuppe (IRC: lemmy)<br />
Mentor(s): Scott Lewis</p>
<p><strong>Hudson Integration for Mylyn</strong><br />
Student: Markus Knittig<br />
Mentor(s): Steffen Pingel</p>
<p><strong>Google Wave ECF provider</strong><br />
Student: Sebastian Schmidt (IRC: sebs)<br />
Mentor(s): Mustafa Isik</p>
<p><strong>Integrate GMF runtime with Mylyn task focused UI</strong><br />
Student: Yongming Luo<br />
Mentor(s): Mariot Chauvin</p>
<p>Congratulations to all the students and a big kudos to the organizers and mentors for their choice. As every year, it is pretty difficult to dismiss so many other good proposals but there were only 11 slots available this year for Eclipse. Looking forward to a great <a href="http://wiki.eclipse.org/Google_Summer_of_Code_2010#Projects">summer</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://eclipsesource.com/blogs/2010/04/27/google-summer-of-code-2010-is-on/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Executable WARs with Jetty</title>
		<link>http://eclipsesource.com/blogs/2009/10/02/executable-wars-with-jetty/</link>
		<comments>http://eclipsesource.com/blogs/2009/10/02/executable-wars-with-jetty/#comments</comments>
		<pubDate>Fri, 02 Oct 2009 08:24:55 +0000</pubDate>
		<dc:creator>Manuel Woelker</dc:creator>
				<category><![CDATA[eclipse]]></category>
		<category><![CDATA[syndicate]]></category>
		<category><![CDATA[embedded]]></category>
		<category><![CDATA[executable]]></category>
		<category><![CDATA[hudson]]></category>
		<category><![CDATA[jetty]]></category>
		<category><![CDATA[servlet container]]></category>
		<category><![CDATA[war]]></category>

		<guid isPermaLink="false">http://eclipsesource.com/blogs/?p=3134</guid>
		<description><![CDATA[Today I want to talk about one of the younger members in the Eclipse family: Jetty. It is great to have such an interesting project on board and it is yet another example of how Eclipse has become more than just an IDE. What I wanted to with jetty was to create an executable, standalone [...]]]></description>
			<content:encoded><![CDATA[<p>Today I want to talk about one of the younger members in the Eclipse family: <a href="http://www.eclipse.org/jetty/">Jetty</a>. It is great to have such an interesting project on board and it is yet another example of how Eclipse has become more than just an IDE.</p>
<p>What I wanted to with jetty was to create an executable, standalone and self-contained WAR. I first encountered this concept in <a href="https://hudson.dev.java.net/">Hudson</a>. The hudson.war contains an embedded <a href="http://winstone.sourceforge.net/">Winstone servlet container</a>, which makes it possible to run the application by executing</p>
<pre>java -jar hudson.war</pre>
<p>This makes test driving the application really simple. The idea was to do the same with Jetty. Embedding the Jetty runtime in the war proved to be the easy part, as it was just a matter of declaring the jetty dependencies in the maven pom.xml.</p>
<p>The tricky part was telling jetty where to find the war-file to serve. My first try was to hardcode the filename, but that left a foul aftertaste. Finding a solution took quite some time, which is why I am posting this for future reference. This is the Main-Class used to bootstrap Jetty (adapted from the Wicket quickstart archetype):</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">org.mortbay.jetty.Connector</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">org.mortbay.jetty.Server</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">org.mortbay.jetty.bio.SocketConnector</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">org.mortbay.jetty.webapp.WebAppContext</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Start <span style="color: #009900;">&#123;</span>
&nbsp;
  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">void</span> main<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> args<span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> <span style="color: #003399;">Exception</span> <span style="color: #009900;">&#123;</span>
    Server server <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Server<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    SocketConnector connector <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> SocketConnector<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// Set some timeout options to make debugging easier.</span>
    connector.<span style="color: #006633;">setMaxIdleTime</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1000</span> <span style="color: #339933;">*</span> <span style="color: #cc66cc;">60</span> <span style="color: #339933;">*</span> <span style="color: #cc66cc;">60</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    connector.<span style="color: #006633;">setSoLingerTime</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    connector.<span style="color: #006633;">setPort</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">8080</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    server.<span style="color: #006633;">setConnectors</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> Connector<span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#123;</span> connector <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    WebAppContext context <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> WebAppContext<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    context.<span style="color: #006633;">setServer</span><span style="color: #009900;">&#40;</span>server<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    context.<span style="color: #006633;">setContextPath</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;/&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #003399;">ProtectionDomain</span> protectionDomain <span style="color: #339933;">=</span> Start.<span style="color: #000000; font-weight: bold;">class</span>.<span style="color: #006633;">getProtectionDomain</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #003399;">URL</span> location <span style="color: #339933;">=</span> protectionDomain.<span style="color: #006633;">getCodeSource</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">getLocation</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    context.<span style="color: #006633;">setWar</span><span style="color: #009900;">&#40;</span>location.<span style="color: #006633;">toExternalForm</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    server.<span style="color: #006633;">addHandler</span><span style="color: #009900;">&#40;</span>context<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">try</span> <span style="color: #009900;">&#123;</span>
      server.<span style="color: #006633;">start</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #003399;">System</span>.<span style="color: #006633;">in</span>.<span style="color: #006633;">read</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      server.<span style="color: #006633;">stop</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      server.<span style="color: #006633;">join</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">catch</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">Exception</span> e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      e.<span style="color: #006633;">printStackTrace</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
      <span style="color: #003399;">System</span>.<span style="color: #006633;">exit</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">100</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>The interesting bit is the <code>getProtectionDomain()/getCodeSource()</code> part, which tells us the location of the war-file. That&#8217;s all there is to it. Presto, executable web-application powered by Jetty in jar.</p>
<p><em>Edit:</em> Added the import statements as per Tim&#8217;s suggestion.</p>
]]></content:encoded>
			<wfw:commentRss>http://eclipsesource.com/blogs/2009/10/02/executable-wars-with-jetty/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Maven in Eclipse</title>
		<link>http://eclipsesource.com/blogs/2009/09/17/maven-in-eclipse-a-powerful-combo/</link>
		<comments>http://eclipsesource.com/blogs/2009/09/17/maven-in-eclipse-a-powerful-combo/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 08:00:15 +0000</pubDate>
		<dc:creator>Manuel Woelker</dc:creator>
				<category><![CDATA[eclipse]]></category>
		<category><![CDATA[syndicate]]></category>
		<category><![CDATA[build]]></category>
		<category><![CDATA[dependencies]]></category>
		<category><![CDATA[hudson]]></category>
		<category><![CDATA[IAM]]></category>
		<category><![CDATA[m2eclipse]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[Q4E]]></category>

		<guid isPermaLink="false">http://eclipsesource.com/blogs/?p=2963</guid>
		<description><![CDATA[In the past I have said some unkind words about about maven&#8217;s pom.xml format. My aversion to xml heavy configuration has drawn me to more lightweight approaches to build systems, like gradle for example. At the same I was intrigued: If a tool like maven is seeing such a widespread use despite its cumbersome format, [...]]]></description>
			<content:encoded><![CDATA[<p>In the past I have said some <a href="http://eclipsesource.com/blogs/2009/08/10/xml-still-no-silver-bullet/">unkind words about about maven&#8217;s pom.xml format</a>. My aversion to xml heavy configuration has drawn me to more lightweight approaches to build systems, like <a href="http://www.gradle.org/">gradle</a> for example. At the same I was intrigued: If a tool like <a href="http://maven.apache.org/">maven</a> is seeing such a widespread use despite its cumbersome format, there must something to make up for it. My curiosity finally got the better of me and I decided to give it a shot. I figured there might be some tooling available to help ease the pain.</p>
<p>And lo and behold, there&#8217;s not one but two eclipse projects for integrating maven. One is the<a href="http://www.eclipse.org/iam/"> IAM project</a> (formerly known as Q4E) and the second is <a href="http://m2eclipse.sonatype.org/">m2eclipse</a>. In that regard it&#8217;s a bit like subversive/subclipse but hopefully without all that licensing nonsense. But it is usually  good to have some choice &#8211; and competition of course. To get a clearer picture I decided to give both plugins a try.</p>
<h4>IAM</h4>
<p>I started with IAM. Setting up my sample project was a snap, and the maven integration immediately started downloading dependencies and adding them to the project classpath. Maven repositories can also hold source jars, making development and debugging much easier. The pom editor seems to cover all options and is looking quite solid. I was more interested in the core feature set, so I didn&#8217;t check out any advanced options.</p>
<h4>m2eclipse</h4>
<p>Next up I tested m2eclipse, which offers basically the same core feature set. Dependencies are automatically downloaded and added to the project classpath. The pom editor covered the same functionality as IAM&#8217;s, but I personally liked the the looks and layout better in m2eclipse. One really nice feature is code completion for dependencies.</p>
<div id="attachment_2999" class="wp-caption aligncenter" style="width: 369px"><img class="size-full wp-image-2999" title="I am too lazy to type..." src="http://eclipsesource.com/blogs/wp-content/uploads/2009/09/maven.png" alt="maven Maven in Eclipse" width="359" height="178" /><p class="wp-caption-text">Code completion - rocks!</p></div>
<p>I know I am spoiled eclipse developer, and <a href="http://eclipsesource.com/blogs/2009/08/17/eclipse-type-inference-at-design-time/">I expect my IDE to finish my thoughts for me</a>. But it gets even better: There is also a quickfix (Ctrl+1) for unresolved imports. Talk about convenience!</p>
<div id="attachment_3000" class="wp-caption aligncenter" style="width: 669px"><img class="size-full wp-image-3000" title="Do what I mean" src="http://eclipsesource.com/blogs/wp-content/uploads/2009/09/maven2.png" alt="maven2 Maven in Eclipse" width="659" height="226" /><p class="wp-caption-text">Quickfix to the rescue!</p></div>
<p>It&#8217;s good to see that there at least two very viable options when it comes to developing maven  projects in eclipse. Kudos to both the IAM and the m2eclipse team for the fantastic work.</p>
<h4>The Price of Modularity</h4>
<p>To me, one of the greatest strengths of the Java Platform has been its rich ecosystem. There are so many java libraries and frameworks out there, that when developing for the Java platform you almost never have to start from scratch. Most of the time it&#8217;s finding the right libraries, writing a little adapter code and the core business logic. No need for reinventing wheels. This truly is modular and reusable software development, and one of the main reasons why the Java platform is so competitive.</p>
<p>But this modularity does come at a price known as dependency hell. Any non-trivial project has a dozens of dependencies. Even your basic run-of-the mill webapp requires a web framework, logging, OR mapper, JDBC drivers, etc. Add in all the indirect dependencies and you are looking at quite a lot of libraries. This is why strong dependency management is such a compelling argument for build systems like maven.</p>
<p>But there is another issue apart from painfully assembled builds: Jumpstarting new developers. Especially for open source projects it is quite a turnoff for a potential contributor to look at the long list of requirements and dependencies needed to get to the point where the code even compiles cleanly. This is where strong dependency management comes to the rescue. Sure, maven may download two and a half internets on the first compile, but when its done you have everything ready to start working.</p>
<h4>&#8220;apt-get for Java&#8221;</h4>
<p>Due to popularity and pervasiveness of maven, there are plugins for integrating almost all imaginable build tools. For most of projects maven provides everything needed right out of the box: unni testing, coverage, javadoc, pmd, you name it. Combined with <a href="https://hudson.dev.java.net/">hudson</a> this makes it ridiculously easy to get a continuous integration server running literally within minutes.</p>
<p>It is good to see that automatic dependency management is making such inroads in different areas of computing. Apt-get and maven, and even p2 have helped a lot to make the dependency hell a little more bearable.</p>
]]></content:encoded>
			<wfw:commentRss>http://eclipsesource.com/blogs/2009/09/17/maven-in-eclipse-a-powerful-combo/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

