Apache Maven & Homebrew

The OK-HTTP project lists that I can compile this project using Maven.  The Maven project is a build tool for (primarily) Java projects.  It provides a dependency list of other bits of compiled code and pointers to how to fetch them for a compile.  There is an alternative tool called gradle, but I’m not going to delve into that that.  I’d love to learn it at some point but I’ll stick with Maven.

Let’s check and see if I’m running Maven already: 

mv --version

.  I get an error back that signifies that I’m not running it on my local machine.  Ok, very well let’s go grab it. This seems like a good time to mention Homebrew, an package manager for OSX.  The description of Homebrew on the official site is that it gives you all the programs and tools that Apple took out of of OSX.  It is command line based, and it’s a quick scripting engine to find common projects and libraries and compile them and any dependencies they may have.  Its very straightforward to install, and you can query it for formula (read: software packages) that they have by running:

brew search maven
brew install maven

 At the end you’ll have a version of Maven installed in your “cellar” under “/usr/local/Cellar/…”  The idea is that programs compiled or installed by Homebrew shouldn’t interfere with a possible prior installed version in the normal “/usr/local/…” directory.  In this way there’s no real conflict if some other app also happens to install maven in the default directory.

Alright, so first up I’ll rerun the “mvn –version” command.  This tells me that unfortunately the version of Java it found on my $PATH is the default Apple provided version, JDK 1.6.**.  That’s definitely not very useful because the OK-HTTP project requires compiling against Java 7, and even I’m running the latest sub-version of Java 8.  Apparently this is common enough that someone has written a shell script to solve this here.  It looks legit, and I’ll tweak it to look for Java 1.8.  Success!  Here is the result of Maven now reporting the correct version:Switch JDK Version

Alright, clone the project and let’s see what we’ve got here.  I’ve followed the “Get up and running with Maven in 5 minutes” tutorial here, which gave me everything I needed (I think).  I created a Maven “goal” to create a stubby simple HelloWorld app.  This gives you a nice organizational tree and a basic JUnit test for that same basic Java class.  It also creates a pom.xml file which is how Maven configures your project.  It’s actually relatively simple– there is a key called “dependencies” and that’s where you can specify that during a build/compile phase of your project, that it reach out and grab a specific version (or the newest) of a JAR to compile your code with.  This makes it really easy for us to add the Ok-HTTP code as a dependency to the project with just a few lines.

Here’s the code I added to my pom.xml file: 


Once there, I asked Maven to go compile my project once again using “mvn compile”, which gave me a successful compilation and the following result:OK-HTTP Maven

I’m now feeling pretty good with the basics of Maven.  If I was to use this in a Java project I could start a project in Maven, do my normal source code, and compile and build against these references to someone else’s code.  I’m ok with that, but honestly (and don’t shoot me), I do most of my Java code in the Eclipse IDE.  Considering this whole project structure that Maven implemented is still different than the Eclipse project structure, (which is in itself different than the Git blob structure) I’ve got some more work ahead of me.

Papers for Mac Review

Papers for Mac Review

This quarter I’ve been doing a lot of research paper writing, article summaries, brief essays and the like for one of my core CS courses.  To be honest, I haven’t had to write a proper essay in at least 10 years, though I did my fair share of writing RFP responses, fluff text,  and technical writing.  My requirements this quarter involve a large (8-10 page) research paper for my Ethics class that is actually really interesting for me, but I was a bit left out on what new tools are out there to support the essay writer these days.  Enter Papers for Mac. (more…)

Outlook 2010 + Google Calendar Sync

I’m actually really digging the new Outlook 2010 technical preview– wow nested email messages. Who knew that it would greatly simplify my life? Anyways, if you also maintain a Google Calendar and have it sync up through their nifty little app, you’re probably in for a bit of pain as you discover that this version of Outlook refuses to sync.

Grr… Not to fear! Here (http://wesmcclure.tumblr.com/post/156968222) there are some friendly instructions if you feel comfortable using a Hex Editor. Do make a backup before you go editing things! After a quick version switch, I’m back to using Google Calendar again.

Holiday Binge on Apps…

I spent New Years “untethered-but-tethered” so to speak. I took my Mini hoping to do a bit of coding, but quickly realized that it just wasn’t going to happen. This wasn’t a bad thing– I can guarantee any code written would’ve been horrible. I did however, spend some QT with my iPhone downloading apps (over AT&T’s Edge network no less)… There were some great apps on sale for cheap prices, and some new ones that I just hadn’t come across before. Here they are:

Tap Tap Revenge 3
Cost: Free (with some In-App purchases to extend the game beyond the 200 or so free tracks)

I don’t know, something about this app’s similarity to Rock Band or (Guitar Hero if you prefer) is engaging enough that I don’t find it to be a rip-off. The tracks are fun, it can be challenging at times, and there seem to be a ton of free tracks associated with the game. Granted, most of the artists probably won’t be recognizable at first glance but you’ll find some neat music here.

F My Life
Cost: Free (AdMob Supported)

When I wasn’t using my phone, my girlfriend was rather obsessively checking this app. Conveniently titled, this app is an extension of the popular web site FMyLife. It supports rating posts, and will use badges to alert you of new posts. You can go back and read (what seems to be) limitless archive of this stuff. A great time waster.

Cost: Free, $.99 for additional services tied to the app beyond your first.

Boxcar came out of a recommendation from one of my favorite blogs, TUAW (The Unofficial Apple Weblog), (which also has an app here). In short, it adds Push notifications to services you choose. @DM’s on Twitter come to my email, but I wanted them to be sent as alerts. Boxcar’s services watch your accounts, and send you an alert, and then delegate to the app of your choice. I like Tweetie 2 on the iPhone, so Boxcar gets the popup alert, and then opens Tweetie to get the message in greater detail. Slick, eh? Support for just about every major Twitter client for the iPhone is there. Boxcar also supports other services such as: Growl, Twitter Search, Facebook, and Email.