Getting ant Working In CentOS 6

I was seeing this error after installing ant on CentOS 6.2 via yum:

$ ant
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tools/ant/launch/Launcher
Caused by: java.lang.ClassNotFoundException:
	at Method)
	at java.lang.ClassLoader.loadClass(
	at sun.misc.Launcher$AppClassLoader.loadClass(
	at java.lang.ClassLoader.loadClass(
Could not find the main class: Program will exit.

Odd, generally yum packages work out of the box. The problem ends up being that ant can’t find ant-launcher.jar The solution is to add the following to your .bashrc

export ANT_HOME=/usr/share/ant
export JAVA_HOME=/usr/lib/jvm/java

Once you do that it should find the necessary jar and work just fine.

Hopefully that saves someone else the hassle of figuring this out.

CentOS 6 Dropped yum-updatesd

I’ll admit I didn’t follow the RHEL/CentOS 6.0 release cycle as closely as I should have. I’m just now jumping into it. Today I learned yum-updatesd was dropped upstream. YUM isn’t perfect, but I did appreciate yum-updatesd. I liked the email notification feature. It doesn’t seem like there’s any alternative that easily gives me that back.

I may just end up compiling this one from source to restore that functionality unless I can find something better. Of course there’s an irony of compiling something from source to handle a package manager.