Category: Software Development

Getting Started: Emacs & C++ (w/ cmake) (On the fly syntax highlighting)

I am a recent convert to emacs. My vast majority of development is in Java EE and I have not found an easy way to get the functionality in eclipse into emacs. So I still use eclipse for this.

However, I like to tinker with C++ and I wanted to get some of the CDT functionality into emacs. In truth, I have used very little CDT so my expectations from emacs will be set differently. Considering that emacs has been used for C/C++ development for decades, I am hopeful that it will be more feature-rich than eclipse or any of the other IDE’s like Anjuta, Code::Blocks etc (both I have tried to use).

First things first. In the world of Java, I am a massive fan of maven which makes build management so easy and simple. Having used it now for years, it is easy to forget how much of a learning curve it had to get started.

Autotools are a massive pain to use and has a very steep learning curve. I have used it in the past to set up build environments and it works fine. pkg-config is pretty awesome and in a lot of ways, maven does pale in comparison. i.e. instead of having maven pull in dependencies, you just use your systems package manager like apt-get or yum and it installs the libraries for you.

Read more »

WARN – Missing artifact descriptor for XXX

Working on an Arquillian test deployment which had some library changes recently, I ran into the following error.

WARN - Missing artifact descriptor for org.javassist:javassist:jar:3.16.1-GA

The particular library was in the pom.xml dependency hierarchy but it was resolving to an earlier  version. Maven was switched to offline mode during the tests and I had never needed this version of the library before. This meant  that the local version of my maven repository did not have jar and maven emits it slightly unhelpful error. It would be better if it told us that it could not find the artifact and since its in offline mode, can’t go and retrieve it.

Read more »

Getting started on seam-security, picketlink IDM and JPAIdentityStore

I love how JBoss 7(.1) has everything working out of the box – not much fiddling with jars or suchlike and with Arquillian, everything really was a treat to get started on a new project. This was until I had to sort out security with seam-security.

To be fair, the main issue was just poor documentation. It took me a day to sort out what should essentially have taken an hour(or two)

The documentation you get to from http://www.seamframework.org/Seam3/SecurityModule seems to be out of date. The fact that the page referes to version 3.0.0.Alpha1 and Alpha2 should have tipped me off but the url for the doc suggested it was the latest.

The more up to date documentation I found was at http://docs.jboss.org/seam/3/3.1.0.Final/reference/en-US/html/pt04.html

I followed chapter 33 on there and I won’t repeat it here for the sake of brevity.

What follows are the additional steps I had to take to get it to work.

Read more »

Automating Code Analysis with Hudson [1115]

As part of setting up continuous integration and automated builds and source analysis, the next step is to integrate in the source analysis parts.

To this end, I installed the following plugins:

Task Scanner
FindBugs
CheckStyle
PMD

After restarting Hudson, there are a few additional configuration bits to complete.

I added an additional build step and set the goal as

checkstyle:checkstyle findbugs:findbugs pmd:pmd

I then enabled the four plugins, saved, ran a build and et voila… Just like magic

 

Hudson / Jenkins and Continuous Integration [1114]

Fair Warning: This is more notes for me to remember and document how to do these things rather than particularly detailed instructions. Therefore, it might be missing sections and will assume a reasonable knowledge of hudson/jenkins and not to mention the benefits of continuous integration and builds.

Installing hudson / jenkins is easy enough. I deployed as part of a pre-existing tomcat6 installation so was as simple as popping the war file into the webapps folder. Tomcat automatically started it up without issues.

I chose to have hudson use /home/hudson as its home directory. Since I am running an ubuntu system, I added a line into /etc/defaults/tomcat6. There are various other ways of doing this but it was a quick fix for me.

You of course need to make sure the directory exists. I also popped in a .m2 folder from my home directory to save it from downloading all the various jar files and included a settings.xml file with appropriate configurations.

Read more »

WordPress Themes