I wanted to take a moment to rant a little about Maven and JPA programming. If you haven’t switched to the Maven way of things (It took me years to give into the dark side!) or you just started doing Maven-ized projects recently, you might still be getting the hang of things.
I won’t lie: it can be relatively hard to get used to. For example, take a look at the traditional directory structure for your project:
This may look a bit complex (like the first time you looked at a Unix directory structure!?) but in fact it’s a fantastic convention. For example, it’s so amazingly easy for me to create sample data files, drop them into src/test/resources/sampleData and then pull the data will a quick Unit Test using
InputStream sampleData = getClass().getResourcesAsStream("/sampleData/myFile");
and away you go! Continue reading “Maven and JPA Programming”