So it turns out the complete project I talked about in my previous post wasn’t so complete: the datastore didn’t work. Getting it to work (with maven) was one of the most frustrating things I’ve done in a long time. No small part of the frustration was that I’ve spent so long getting the infrastructure set up for this project without having gotten to any of the “interesting” bits. Luckily, I think with the datastore working most of the infrastructure work should be mostly done.
That said, there are still some things I haven’t done. I haven’t yet retrieved the data from the datastore (though I uploaded the app (via maven) and verified that the data got set properly). I also haven’t figured out how to do datastore migrations. The first problem I don’t expect to be too hard (storing should be harder than retrieving, knock on wood) and I find the second problem interesting (unlike wrestling with poorly documented third-party tools for almost a week).
I’ve updated the link to my zip to include my new discoveries. There are many things about my solution that I don’t like, but I’m at the point where I really just want to start working on the fun stuff. The main problem is that I had to implement the datanucleus enhancement via an ant task rather than the datanucleus maven plugin. I have a separate pom.xml in the buildResources folder that installs the (very simple) ant plugin, though I haven’t figured out how to get that to automatically install alongside the main pom.xml’s build, nor automatically get installed when I change it. I’m sure there’s a way (and if anyone knows, I’d love to know too), but I’d rather put my energy toward the game I want to make.
Here’s the link to the zip: http://euclid.poundcs.org/~kevin/cleanGaeWithLift.zip There’s a readme there explaining what to do to get it to work (it should be simple). I’ve sprinkled the pom.xml file with comments describing why I’ve done certain things the way I did. Any comments on it would be greatly appreciated. The project includes a single, simple datastore object (User.java - yes, I made the datastore objects in Java since I had some trouble injecting Scala classes. I’ve read it’s doable, but I wanted to tackle one thing at a time) which can be used as an example.
Time for bed. I can’t wait to actually get started on the fun parts of this project :)