Eclipse fired up, Jetty installed, web-project set up, let's get some work done. I start dropping some of my favourite stuff in WEB-INF/lib. First stop, Hibernate. Hm, Hibernate 3.5 is out. Requires JPA 2. Hm, too cutting edge, plus I don't want to go around hunting for a JPA 2 jar when I got the JPA 1 right here. So let's stick with that, as I don't want to go and debug weird exceptions in Hibernate later on. If you ever looked at Hibernate source code, you know why.
Next stop, Spring. Spring 3 is out! Sweet. Ok, these guys I trust, plus their stuff tends to be documented, so let's go for it. After download, hm. With 2.5 I got one big spring.jar which contained everything, now I got lots of module jars. Ah well, maybe stuff got too big for them to put it in one. So let's go assemble, core, beans, context, aop, that should do. Erm, where are the dependencies? I browse around a bit in the directories, but no lib folder or something.
find . -name .jar => no dependencies. What's going on here? Did I download the wrong thing? Nope, there's only this one.
Instead what I see is POM. Now I have a special relationship with Maven, and that is that I hate the bloody thing. But seems that I either have to go around hunting for JARs for the next days, not even knowing which version is right, or go with a dependency management tool.
Now since Maven is out of question, there's also an ivy.xml. So why not give Ivy a try. Well, 10 minutes later, I got the Ivy Eclipse plugin running and the first xml set up. So, let's see... spring-core, 3.0.0-RELEASE. What's the "release" doing there? Would they put it online if it's not a release? Means something like Hibernate's GA probably. So go Ivy and collect all them jars!
Some minutes later, we have the following situation:
- Ivy quit in the middle because there's a dependency from Spring against some JBoss lib that can't be resolved using the maven repos.
- I have some log4j.jar in my classpath. And commons-logging. Now guys, I roll with slf4j, so I don't need these, more, I don't want these!
But at this point, I decide to stop dependency management and go back to doing it myself. After some searching, I also found this: http://jira.springframework.org/browse/SPR-6575
Seems I'm not the only one out there. Now please, Spring people, how hard can it be to include the libs in your build? Everyone else out there does that. And telling me to just use the old dependencies because Spring is backwards compatible is not what I like to hear for a new project.
Still, as a conclusion, I like Ivy better than Maven. Well, given, there are not many things that's not true for :)

No comments:
Post a Comment