Pages

Wednesday, 27 February 2013

Setting up STS for github

Was playing with git repositories. There are two contenders : Cloud Foundry and Github. But first on the IDE : since the code I had was Spring-based (MVC and Roo) the choice is Springsource Tool Suite (STS). For Eclipse I was told that for my code, I need to do the extra step of setting up AspectJ. Why the hassle?

Back to git. Cloud Foundry charges $7 per month for two users. Github charges $7 per month for unlimited private repositories and users.

I decided to give Cloud Foundry the first chance. Registering for 30-day free trial was easy. Using steps in some blogs, I could also very easily push code from STS to Cloud Foundry.

But on the site, the code appeared with carriage return ‘\r’ characters at the end of the lines. The raw view was better, but it was not syntax highlighted and the navigation bar does not appear. There was no appealing color slickness to the web view. I did not like it at all.

Next day I tried Github. My first two attempts at pushing the code were long winded. I tried to follow steps in various blog posts and finally ended up sending my project as a folder in the github repository. Meaning, if the repository name on github is myrepository and the project name in STS is myproject, the code appeared as github.com / myuserid / myrepository / myproject. It sucks, I thought. It should be github.com / myuserid / myproject.

Noting that the key step in connecting to a git repo in STS (or Eclipse) is Team -- Share project, next day I again started from scratch. Happily I realized that the steps are pretty straightforward. Github’s web view is very navigable, with pleasing color schemes and syntax highlighting of the code. So for me, github is the clear winner over Cloud Forge.

For configuring STS for github, I am documenting the steps, for my own reference later and they may be helpful to others also: