In trying to automate our DB development, we decided to use ant and Jenkins to run our SQL scripts for a deploy. We had a hard time getting ant to work and after much trial and error (and cussing and fussing) we finally got it to work. The key really was the addsourcefile=”false” attribute and the redirector. Since mysql can run sql from a file using redirection (< ) you have to use a redirector (which is poorly documented). The ant apply task can apply an executable to every file in a fileset, so this will use the mysql executable to exec every *.sql file it finds. Continue reading
Category Archives: Geek
Using the Sonar REST API for weekly emails
At work, we wanted to create an automated weekly email to the team that shows how we’re doing on new code. Sonar (now SonarQube) has a Sonar REST API and a Sonar Java WS client wrapper for it. Here’s how I did:
First, you need to round up some jars. You need:
- commons-logging
- httpclient
- httpcore
- json-simple
- sonar-ws-client
MC Frontalot Kindle Scrensaver Images
I just hacked my Kindle to show custom screensaver images and found zero MC Frontalot Kindle images online! As a huge Frontalot fan, I could not sit idly by while the interwebs were devoid of Frontalot Kindle images, so I made some.
Click for the larger image, ready for your Kindle. (I did not create these images, I just made them Kindle-ready)
Enjoy.
Unit testing JavaBeans
I always just pretty much skipped unit testing JavaBeans since the work involved didn’t seem worth it. Today though, I was troubled by the lack of coverage on the Javabeans in our Emma code coverage reports so I googled and found this bit of unit testing brilliance: Unit Testing Javabeans. It’s a simple class that uses introspection to test the bean and works great!
Starting Insanity Tomorrow
I’m stating the Insanity workout tomorrow. I’m 5′ 11″ and 174 pounds – I’m not overweight (though I’m near the top of the range), and my BMI is in the healthy range. I’m out of shape though – seriously out of shape. It’s been ages (and by ages, I mean YEARS) since I’ve done any real exercise. So, this should be fun. I’m not looking to lose weight, just looking to get in shape.
Today I’ve been prepping food for the week – I feel like I’m prepping for the Zombie Apocalypse. Seems like I prepped all day.