<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6349988986816733922</id><updated>2011-04-22T02:59:26.131+02:00</updated><title type='text'>coffee.spawn</title><subtitle type='html'>Roasted coffee. And thoughts.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://coffeespawn.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6349988986816733922/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://coffeespawn.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Tom</name><uri>http://www.blogger.com/profile/08278325937325931123</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://3.bp.blogspot.com/_EY2RsMDgE54/STgSW1NFYDI/AAAAAAAAAAs/Yl_GfhmkHoI/S220/me.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>2</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6349988986816733922.post-6629508159145455197</id><published>2008-12-19T10:21:00.003+01:00</published><updated>2008-12-19T11:57:52.575+01:00</updated><title type='text'>Maven, eclipse and continuous integration</title><content type='html'>One of the key factors in mixed eclipse/PDE/maven projects and the most difficult to set up is a working build system with maven. Setting up a large maven project with a working eclipse/PDE build and non-eclipse projects isn't easy and unfortunately there isn't much help on the internet either, because the whole thing is very complex.&lt;br /&gt;&lt;br /&gt;We had several redesigns of the build structure and it took a long time to get to where we are now. The good news is: it works great. Here's our set up:&lt;br /&gt;&lt;br /&gt;Key facts:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;contains eclipse plugins built with the eclipse/PDE builder from maven (maven eclipse plugin)&lt;/li&gt;&lt;li&gt;contains plain projects packaged as OSGI bundles to be used in non-OSGI environments such as the server and OSGI environments such as the eclipse platform&lt;/li&gt;&lt;li&gt;easy to integrate in CI build systems&lt;/li&gt;&lt;li&gt;produces an export of the product in a .zip file&lt;/li&gt;&lt;li&gt;executes tests&lt;br /&gt;&lt;/li&gt;&lt;li&gt;mvn site not integrated yet&lt;/li&gt;&lt;li&gt;note that plain projects used in the eclipse platform should always be 'bundled', i.e. in jar with an OSGI manifest in order to prevent classloader problems.&lt;/li&gt;&lt;li&gt;standard libraries such as spring, hibernate, apache commons stuff etc. should be 'bundle wrapped' and copied into the eclipse platform in our SVN structure. You don't need to bundle wrap them yourself, most libraries are already bundle wrapped by spring source: &lt;a href="http://www.springsource.com/repository"&gt;http://www.springsource.com/repository&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Subversion structure&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;/pom.xml&lt;br /&gt;/build&lt;br /&gt;---/eclipse-build &lt;span style="font-size:85%;"&gt;(contains the eclipse environment that actually DOES the build)&lt;/span&gt;&lt;br /&gt;---/eclipse-platform &lt;span style="font-size:85%;"&gt;(contains the eclipse environment used for launching the application, note this also contains all required OSGI-bundles such as spring etc.)&lt;/span&gt;&lt;br /&gt;---/maven &lt;span style="font-size:85%;"&gt;(contains hierarchical maven pom.xml's to be used as parent poms for the project) &lt;/span&gt;&lt;br /&gt;/myproject&lt;br /&gt;---/module &lt;span style="font-size:85%;"&gt;(eclipse plugins and OSGI-bundles or plain projects)&lt;/span&gt;&lt;br /&gt;---/product &lt;span style="font-size:85%;"&gt;(the product defining eclipse plugin)&lt;/span&gt;&lt;br /&gt;---/pom.xml&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;More details:&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/myproject/module&lt;/span&gt; contains most of the projects. Each project must contain a META-INF/MANIFEST.MF for OSGI. Optionally they can be eclipse projects (i.e. with a plugin.xml, .project and .classpath files etc.). At first we used BND to generate the manifest files automatically but now we maintain them manually as there are not too many changes being done. Do not check in .project and .classpath as they're generated automatically by &lt;span style="font-style: italic;"&gt;mvn eclipse:eclipse&lt;/span&gt;.&lt;br /&gt;Same goes for &lt;span style="font-style: italic;"&gt;/myproject/product&lt;/span&gt;, except that there are only one or two projects: the primary eclipse plugin with the product definition (and optionally any test projects that can be run during the test phase of maven).&lt;br /&gt;&lt;br /&gt;Now to the maven pom hierarchy:&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/build/maven/&lt;/span&gt; contains ALL parent poms used. It doesn't have a parent.&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/build/maven/pom.xml &lt;/span&gt;is a simple pom that just lists all sub directories in the module section.&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/build/maven/settings/pom.xml&lt;/span&gt; is a pom with standard dependencies listed and the according version number. This is so that you can omit the version number in your projects when adding dependencies because of the inheritance of maven poms. This is a feature of maven2. This pom does not have any parents.&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/build/maven/javasettings/pom.xml&lt;/span&gt; has the settings pom from above as a parent and contains settings for java builds in general, such as the maven-compiler-plugin using a configuration to build java 6 projects.&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/build/maven/bundlebuild/pom.xml&lt;/span&gt; has the settings pom from above as a parent and is responsible for settings for plain java projects in order to maintain an OSGI conforming manifest file (in our case it just contains a build -&gt; plugins entry with the maven-jar-plugin artifact telling it to archive the manifest file for the test-jar goal.&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/build/maven/eclipseproject/pom.xml&lt;/span&gt; contains everything necessary for building eclipse projects (uses the maven-eclipse-plugin). Uses the javasettings pom as a parent&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/build/maven/pluginbuild/pom.xml&lt;/span&gt; is reponsible for eclipse plugins and uses the bundlebuild pom as a parent.&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/build/maven/productbuild/pom.xml&lt;/span&gt; is a pom for PDE products and uses pluginbuild pom as parent. Contains profiles that can be selected for specifying the target OS and uses the pde-maven-plugin for actually building the product.&lt;br /&gt;&lt;br /&gt;The hierarchy is probably a bit too complex but allows child poms to select the proper parent pom. Each parent pom in the &lt;span style="font-style: italic;"&gt;/build/maven&lt;/span&gt; directory has its own dependencies and settings.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now to the &lt;span style="font-style: italic;"&gt;myproject&lt;/span&gt; directory:&lt;br /&gt;You can name this directory whatever you like. This is the main directory containing the production code and test code.&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/myproject/pom.xml &lt;/span&gt;is a simple pom with &lt;span style="font-style: italic;"&gt;module&lt;/span&gt; entries pointing to the directories &lt;span style="font-style: italic;"&gt;module&lt;/span&gt; and &lt;span style="font-style: italic;"&gt;product&lt;/span&gt;. The parent pom is just the top pom in your trunk.&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/muproject/module/pom.xml&lt;/span&gt; is a simple pom with &lt;span style="font-style: italic;"&gt;module&lt;/span&gt; entries containing all your modules used in your project. It just uses the parent pom from one directory level up.&lt;br /&gt;Same goes for &lt;span style="font-style: italic;"&gt;/myproject/product/pom.xml&lt;/span&gt;, except it has a &lt;span style="font-style: italic;"&gt;module&lt;/span&gt; entry for each of your product defining plugins. Normally only one but having multiple product plugins should be common enough, e.g. if you have products using a subset of all your modules/plugins.&lt;br /&gt;&lt;br /&gt;Now any project under /&lt;span style="font-style: italic;"&gt;myproject/module/&lt;/span&gt; should have a pom with the &lt;span style="font-style: italic;"&gt;bundlebuild&lt;/span&gt; or &lt;span style="font-style: italic;"&gt;pluginbuild&lt;/span&gt; poms as parents, depending on whether you have plain projects or eclipse plugin projects. You just need to specify the dependencies (omit the version number if using dependencies already defined in the &lt;span style="font-style: italic;"&gt;settings&lt;/span&gt; pom) and specify and additional settings you might need. Because of the pom inheritance you have everything build related already in there.&lt;br /&gt;&lt;br /&gt;Finally you need a 'super' pom, the one in your top level directory. This one should just have 2 module entries: &lt;span style="font-style: italic;"&gt;build/maven&lt;/span&gt; and &lt;span style="font-style: italic;"&gt;myproject&lt;/span&gt;. When executing &lt;span style="font-style: italic;"&gt;mvn install&lt;/span&gt; all the magic starts. Use &lt;span style="font-style: italic;"&gt;mvn eclipse:eclipse&lt;/span&gt; to generate the eclipse specific files so that you can edit the projects within the eclipse IDE.&lt;br /&gt;&lt;br /&gt;If you're too lazy I might put the skeleton files of the above system online but that might take a few days (need to remove any company specific stuff) ;-)&lt;br /&gt;&lt;br /&gt;/tom&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6349988986816733922-6629508159145455197?l=coffeespawn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://coffeespawn.blogspot.com/feeds/6629508159145455197/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6349988986816733922&amp;postID=6629508159145455197' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6349988986816733922/posts/default/6629508159145455197'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6349988986816733922/posts/default/6629508159145455197'/><link rel='alternate' type='text/html' href='http://coffeespawn.blogspot.com/2008/12/maven-eclipse-and-continuous.html' title='Maven, eclipse and continuous integration'/><author><name>Tom</name><uri>http://www.blogger.com/profile/08278325937325931123</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://3.bp.blogspot.com/_EY2RsMDgE54/STgSW1NFYDI/AAAAAAAAAAs/Yl_GfhmkHoI/S220/me.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6349988986816733922.post-5260545681043034980</id><published>2008-12-04T14:10:00.001+01:00</published><updated>2008-12-04T14:50:04.029+01:00</updated><title type='text'>Applying the Agile Manifesto in practice</title><content type='html'>Just today I came across referring to the &lt;a href="http://agilemanifesto.org/"&gt;agile manifesto&lt;/a&gt;. We have it framed on the wall just beside the door to our office. It usually doesn't get much attention.&lt;br /&gt;&lt;br /&gt;We started a new sprint yesterday and a fellow team member was giving out about another (non-scrum) team regularly changing the database schema which we share. It doesn't happen often but when it happens it usually breaks our continuous integration build. My scrum team is a small sub project as part of a bigger project. We're basically developing a set of components for a specific customer. Most of the components work automatically in the background and process data relevant for the customer. In our sub project we're developing a multi tiered GUI client based on the &lt;a href="http://www.eclipse.org"&gt;Rich Client Platform&lt;/a&gt; and we're basically the only agile project in the entire project. The only interface to the other projects is a massive database.&lt;br /&gt;&lt;br /&gt;Anyway, back to my ranting colleague. I was discussing with him and the rest of the team if it's worth putting this on the impediment list but the tenor was, 'well, uhm actually it's not that bad but in the last sprint we had this happening two times and it doesn't really fit into the agile process. If they want to change something they should tell us and we can plan it into the next sprint'.&lt;br /&gt;&lt;br /&gt;This didn't sound very much like scrum to me. 'They' and 'us' is always an indication that something is wrong with communication. And I can't imagine the other teams being happy about waiting up to two weeks before we can integrate the system. So I remembered the good old agile manifesto and there was the solution, based on two of the four principles:&lt;br /&gt;&lt;br /&gt;Individuals and interaction over processes and tools - talk to the guys, we're all working on the same thing. The customer doesn't care that we have multiple projects. Even though we have a agile process based on scrum, talking to the individuals is much more important than following the process by the book. It's much easier to just talk to the other folks and ask them to inform us whenever they plan to change the shared database schema so that one of us can change our persistence layer.&lt;br /&gt;&lt;br /&gt;Responding to change over following a plan - change in the form of changing database schemes is apparently necessary in the entire project so the best thing is to 'embrace change'. Ok if it really is stopping somebody in the team from working it should be put on the impediment list and resolved soon, but this isn't really the case. It takes a minute or two to implement the changes necessary to make our software compatible to the database changes.&lt;br /&gt;&lt;br /&gt;I thing this is a very good example where going back to the agile manifesto was a good idea. No need to discuss a lengthy process of applying database changes nor any tiring email discussions. Being agile and pragmatic works :-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6349988986816733922-5260545681043034980?l=coffeespawn.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://coffeespawn.blogspot.com/feeds/5260545681043034980/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6349988986816733922&amp;postID=5260545681043034980' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6349988986816733922/posts/default/5260545681043034980'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6349988986816733922/posts/default/5260545681043034980'/><link rel='alternate' type='text/html' href='http://coffeespawn.blogspot.com/2008/12/applying-agile-manifesto-in-practice.html' title='Applying the Agile Manifesto in practice'/><author><name>Tom</name><uri>http://www.blogger.com/profile/08278325937325931123</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://3.bp.blogspot.com/_EY2RsMDgE54/STgSW1NFYDI/AAAAAAAAAAs/Yl_GfhmkHoI/S220/me.jpg'/></author><thr:total>2</thr:total></entry></feed>
