Archiv der Kategorie: Projects

Projects

Hudson vs. Jenkins – more thoughts

After having released the last post about Hudson vs. Jenkins, I have read quite a lot about this issue. Sonatype seems to have started a new „campaign“ on their relationship to and investments into hudson (see their latest banner on their homepage, where they state: „Maven + Hudson = a heart is shown here“).

Of course Sonatype (which is a heavily risk capital backed company) would like to earn money with this move. Some of the reasons are IMHO really well explained on Thomas Ferris Nicolaisen’s blogpost. Right now it looks like the whole community is in an real outcry about this move and especially the involvement of Sonatype and seem to be slightly annoyed by this move (see: Jerome’s Coffebreak).

Not all the critics of Jason on Hudson are 100% right, but he has a point. The only real question here is, why he (Sonatype that is) has not taken Benson (Sonatypes own Hudson Fork, without a real Homepage or anything like that, so it does not seem to „active“) and put it into the Hudson code? There could be several reasons, e.g. Koshuke was not really into making Hudson a totally Maven focused application.

Most probably Jason and Sonatype like to push Maven 3 into the market quite heavily. They are not the only company doing this, though. Hudson is a very good fit in Sonatypes software stack. So Sonatype is building up their software stack with Maven 3, Nexus, Hudson and Eclipse kind of stuff. Like Thomas Ferris Nicolaisen points out, there is still the option, that Oracle is going to buy-out Sonatype and that would most probably a good fit for Sonatypes investors 😉 (The whole discussion seems to be money related, doesn’t it?)

The least we can say is, that Hudson and especially Sonatype is now receiving a lot of attention due to this move, and they should have this attention, because otherwise Hudson would be dead (long live Jenkins ;-)).

On a sidenote, why did Jason and Sonatype not support Continuum instead of Hudson, Jason seemed to be a contributor to this project as well? The answer stays unsure, but I guess, Jason is going to put his bets all on market leaders to become a market leader on its own (well, with maven he is already, but what about Sonatype?). There are some strong competitors in the ALM market (is this the right name for this niche?) like e.g. the guys from MaestroDev, but they do not have this momentum as Sonatype has right now. The product portfolio seems to be (at least at a first glance) quite similar, only the selected/made tools are different. Maestro totally focusses on Apache Projects, whereas Sonatype implements its own products (at least this is true for Nexus).

So the question, who will win the race for the most usage in the CI market is still open. I strongly believe that there is a place for Hudson as well as Jenkins in the market. Oracle is going to offer professional support to Hudson and Sonatype is doing it already, something, Jenkins does not have right now (at least not that I am aware of). I and the company I work for am not a real contributor to the success of Sonatype and neither Oracle through buying their products or support, but we will stick to Hudson at least in the near future. Lets see the outcome of all this. Probably I re-decide on this one, depending who fixes the well known GZIP Problem first 😉

Another side note is some missing pieces in the Sonatype Software stack, after they do have already the whole Development Cycle in their portfolio (pretty close to IntelliJ and Atlassian, I guess). One piece of software still missing the from Sonatypes stack would be Sonar (IMHO), which is used in the IT industry quite often as well. So, lets see, if Sonar stays with the current company or if some other company is going to buy this piece of software as well, it would fit perfectly into the Sonatype offerings though.

So, the whole Java Open Source market, especially in the Development and Apllication Lifecycle management, seems to change right now. Sonatype seems to be one of the leaders in this market, next to Atlassian, which has a slightly different target group. It is nowadays all about earning money. Hopefully the support into Open Source projects will stay as it is right now from these kind of companies 😉

For more information about this story please also visit:

Hudson and Jenkins now on GitHub
Hudson vs. Jenkins

Hudson vs. Jenkins

In my last blog post, I mentioned, that we are still using Hudson instead of the new community fork Jenkins. You can ask now why we are doing this. This is mainly a personal decision, and it is not about Oracle and their „relationship“ to open source communities, but more about Sonatype and their involvement in the future of Hudson (see blog post here, here and here). I think that if the leader of Maven (Jason van Zyl) is investing time and resources into the hudson project, it is definitly worthwhile to stay there. Lets see if this is going to work out.

For more information about this story please also visit:

Hudson and Jenkins now on GitHub
Hudson vs. Jenkins – more thoughts

Maven CI Best Practices

Yesterday our Admin came to me and told me, that the Harddrive on our CI Server is nearly full. This is due to the fact that our Nexus Repository as well as our Hudson CI Server are installed on the same machine. Hudson is using it’s own locale repository and therefor all Snapshots are filling up the diskspace.

Hudson has its own local repository due to the fact, that we are following the best practices mentioned by Jason Van Zyl on this blog post.

What I did now, was to purge the local repository of Hudson. Unfortunately we are not following all Maven best practices and therefor one project (the master pom for all other projects) is then missing from the local repository. I hope that I can clean this up during the next couple of days (hey, we are in a pretty tough project right now, and therefor the time for this is not really there). This means, that we do have to build and „mvn install“ this project (base-build) directly after the purge. Furthermore I am cleaning up the Backups we are doing using ThinBackup (a small Hudson Plugin). Therefor we are using the following script:


#!/bin/sh -e
# fetches all changes in all repositories and sync it to redmine
cd /var/cache/hudson/mvn-repository
rm -rf *
cd /var/lib/hudson/jobs/base-build/workspace
su hudson -c 'mvn clean install' > /dev/null
cd /var/cache/hudson/backup
find . -mtime +5 -exec rm {} \;

Furthermore we are now using a scheduled Task in nexus to purge the Nexus Repository from any Snapshots older then 5 days, but keeping at least the latest snapshot (see another blog post).

After some more cleaning of e.g. log files and more, the disk is now half full (or half empty, depending on your point of view). This was more then enough for me.

Hope this helps.

Spring WebMVC and BindingResult Errors

We have the need to add FieldErrors inside the Controller, we have tried it several times using the usual FieldError-Constructor:


FieldError error = new FieldError("objectname", "fieldName", "text", false, new String[]{"error.invalid.fieldcontent"}, new Object[]{"argument"}, "defaultMessage");
result.addError(error);

This wasn’t working, until I stumbled across this posting from TechnoBabble. You (We) needed to add the @ModelAttribute(MODEL_NAME) annotation to our method signature, like so:


@RequestMapping(method = RequestMethod.PUT)
public String update(@ModelAttribute(MODEL_NAME) @Valid Model model, BindingResult result, ModelMap modelMap)

Now everything works fine. Thanks to Antonio Gonzalez from TechnoBabbel.

Additional Note:
If you would like to skip the @ModelAttribute Annotation, it is possible as well, but then the modelMap needs to contain the object name in CamelCase (e.g. „objectName“ and not „objectname“). This works as well.

IRC: nick/channel temporarily unavailable

I am using the public ZNC (an IRC bouncer) from globalshellz.org for my access to the freenode IRC network. I have had a minor problem when I connected to my ZNC. Since my away nick was not registered to my account (which is triplem btw), I have had to „login“ each time when I connected to the ZNC and my nick was changed from triplem[a] to triplem. So, I started my IRC client (XChat btw) and forgot to type in my password again, this lead to a problem that my nick was temporarily unavailable. To resolve this I looked on the freenode page and found the following easy solution:

  1. Registered my away nick with /nick triplem[a] and /msg nickserv group (of course I needed to login to my account, which was not a problem, since several nicks are already grouped to my main nick and I just chose one of those).
  2. I released the original nick (triplem) with the following command: /msg nickserv release triplem , and everything was fine.

Hope this helps you as well. And if you would like to meet me on IRC, you can take a look into the following channels:

  • #shellium
  • #globalshellz
  • #netburst
  • #archserver

Probably we meet us there 😉

Git: split repository into several smaller ones

In our company we did create a new project using git as the repository. The repository is central on our development server as well as on each developers machine. Previously we used SVN, so the whole team is still used to a central repository, and furthermore our infrastructure (Redmine, Hudson, …) needs access to the repository.

After creating the project, we did several refactorings and splitted the whole project into several smaller ones. We did this all in one repository, without any problem. But because e.g. Hudson needs access to a single project, and we wanted to build all components standalone, we had a problem. We needed to split the git repository.

To solve this issue, first we needed to push all changes to the new repositories (note that we pushed the whole project into different repositories, to keep the whole history). For this to work, we first copied the whole project into different directories (named after the project names) and then executed the following script:


#!/bin/sh
cd $1.git
git remote rm origin
git remote add origin ssh://mmay@server.tst/srv/git/$1.git
git push origin master

After this is done, the new repositories needed to get cleaned up:


cd $1.git
pwd
git filter-branch --subdirectory-filter $1 HEAD -- -- all
git reset --hard
git gc --aggressive
git prune

After this, we removed the projects from the original projects, but kept the repository itself, just to have all the initial history before the split into several components with different subdirectories.

Hope that this helps you as well 😉

PS: Some of this stuff was taken from http://stackoverflow.com/questions/359424/detach-subdirectory-into-separate-git-repository.

More thoughts on the ALM Stack

I am just thinking, that just providing some Toolset, like the ALM Stack is not enough. There is some documentation needed, not only for configuration, maintance and usage of the ALM Stack, but also some hints and best practices for the handling of projects.

Since we are already providing a wiki in our toolbox (Redmine contains a wiki), we will most probably provide an initial project in Redmine which will be configured the „right“ way and contain some documentation.

Most of these best practices are already documented elsewhere, so we will mostly provide links to these resources, as well as additional resources we can provide ourselves.

If you have any input on this, do not hesitate to contact me anytime.

My ALM thoughts

Yesterday we released a new ALM Stack based on ArchServer, which replaces the beforehand already known „Arch Linux Development Stack„. I guess the name change was needed due to the fact that the underlying architecture changed from Arch Linux to ArchServer and furthermore the ALM in the name shows more appropriate what the purpose of this stack really is.

The goal of this software stack is really, to release a full working stack of tools needed for a Application Lifecycle Management. The selection we chose (Maven, Hudson, Nexus, Sonar and Redmine) is pretty much a best-of-breed solution. One of the main ALM-Software components (IDE) is still missing though. Since this is not a server-side component, it would be really hard to provide this as well. But I guess we should provide an instance of Eclipse with all needed Plugins pre-installed (Mylyn with Redmine Plugin, Git, m2eclipse and probably more…). The same could be done for IntelliJ Idea, which I do like a lot as well, lately.

Something, which should be implemented as well, is most probably ReviewBoard or Gerrit for Reviewing code changes. This is IMHO not needed in all cases of software development, but in some (eg. the Android development and/or the KDE developers).

A real nice thing would be to provide a kind of „Installation procedure“ to install all components in one step with some personalizations as well (e.g. Hostname of the ALM Stack host). Furthermore some real documentation is needed, so that the „customer“ will find the answers to all their questions.

If you would like to participate, do not hesitate to write an email to me 😉

ArchServer – ALM Stack

Please take a closer look onto the newest addition of the ArchServer distribution. I have just published a ALM (Application Lifecycle Management) Stack for this distro with all ALM related tools already installed.

The stack contains the following components:

You can find all scripts to install such a stack (I named the stack Archlinux Development Stack earlier on, but it should now be called ArchServer ALM Stack), on Github. There is also additional information about this stack. In the near future I hope to add more components as well as more documentation. The documentation should then be also put into the ArchServer.org wiki.

The Virtualbox image itself can be found on our mirror at http://mirror.archserver.org/iso/vbox/ArchServer-ALMStack-20110101-i686.vdi.lzma. The image is lzma-compressed, so you need lzma to decompress the image.