Tuesday, November 16, 2004

Half-life 2

This hasn't to do with programming, but is still very exiciting: Half-life 2 is out! After having to wait way to long, the game is finally released! Usually I don't play computer games, but this one is so good it's worth mentioning here.
It took a lot of patience to install it since the Steam registration servers were overloaded. But finally, I managed to start the game and it looks/plays/feels amazing.
Somehow, I felt the urgent need to play "Peter Gun Theme" from the Blues Brothers while waiting for my registration to complete...

Wednesday, November 10, 2004

Maven, JUnit and Log4j

I had a hard time trying to let Maven know where to find log4j.properties when running JUnit. Found nothing in the Maven docs or on Google about this. A friend of mine (yo, Maarten!) helped me to find the solution.

I got every time the message "Please initialize the log4j system properly". I put log4j.properties in almost every possible directory (src/conf, src/java, ...).

Add this to project.properties:

#setup for junit testing
maven.junit.sysproperties=log4j.configuration
log4j.configuration=log4j.properties

And add this to project.xml. The trick is that you need to include the log4j.properties file as a resource here.

<unitTest>
<includes>
<include>**/*Test.java</include>
</includes>
<resources>
<resource>
<directory>${basedir}/src/test</directory>
<includes>
<include>**/*.xml</include>
<include>**/*.properties</include>
</includes>
</resource>
<resource>
<directory>${basedir}/src/conf</directory>
<includes>
<include>log4j.properties</include>
</includes>
</resource>
</resources>
</unitTest>

Monday, November 08, 2004

Spring FactoryBean

A way to access an object of type FactoryBean in your spring xml files, is to use context.getBean("&yourFactoryBean").

This will return the FactoryBean itself instead of calling getObject().

Labels: ,

Java 1.5 released

Java J2SE 1.5 has been released. Read about the new features or download it.

Saturday, November 06, 2004

Server time accuracy

I finally managed to set my servers clock right automatically with ntpdate. I did this by following this guide. A list of publicly available servers is available here.

Labels: