Skip to content

Compiling with Black Magic

Last updated on 2012-12-09

Today I decided to stop being a bad software craftsman (for the $(n^n)^th$ time), starting with the simple task of getting my project to compile in Travis CI. For those of you who haven’t met Travis CI, it is a free cloud-based continuous-integration server. You can configure it so that every time you push to your GitHub repository, it builds your project and executes your tests (if you have any). I set up Travis some time ago, but after the semester started (teaching takes a lot of time) I didn’t find the time to configure it properly.

So here I was, with a red CI, a set of eclipse plugin projects, and no idea what to do. So I searched Google and found this great tutorial, which shows how to do all the steps required for everything to work. Oh, I also have to install Maven and something called Tycho. Now it is easy, just add to each plugin project a .pom file as shown here, or better yet, run in the command line:

mvn org.eclipse.tycho:tycho-pomgenerator-plugin:generate-poms -DgroupId=

Which magically creates all the .pom files in the plugin directories and creates a parent .pom. Cool. Commit, push, CI still red :-(. What is wrong with this thing… Oh, the file generated by tycho does not add the eclipse repository to the .pom files, so maven fails because it doesn’t know from where to download eclipse dependencies. OK, now I test locally before pushing, looking good, commit, push, GREEN CI!!!

I hate this type magic based programming. When I started programming, I wrote makefiles that managed my team’s builds. They were ugly, they were complicated, but you at least knew what was going on. Now I have no idea, not in the tiniest bit, what is going on in these .pom files, how my project is being built, how the files are wrapped… I have to admit it, I’ve lost that love and feeling. There are no “manuals” anymore, just short tutorials and examples (or maybe there are manuals, but if you read all of them you would never have time to code. And they are also very hard to find). I’m working with products whose version number is 0.16.0 but are being used to build projects that we use everyday. The amount of complexity is just too high…

It feels black magic. Tomorrow I’ll add one candle to my maven and tycho gods… next to the candles I always light for the gods of air conditioning, laundry machine, dishwasher and child day-care. May they never fail us :-).

 

Enhanced by Zemanta
Published inProgramming

Be First to Comment

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.