Splitting Up the Default /lib Directory

Came across an interesting idea in a directory structure for the examples in a Spring tutorial at Zabada Technologies. I’ve never seen it before, but it does solve a common problem I’ve had with mixing jars that were only needed for testing or things like the servlet-api.jar which would already be in any container.

The solution is simple. The main top level

1
/lib

directory just contains all the jars that are actually needed to run the app. Another top level

1
/lib-build

is just used for dependent jars like the servlet-api.jar and the junit.jar that would only be used for building.

Since I still haven’t looked into AppFuse and it’s directory structure I don’t know whether I’ll adopt this as a default for the team yet, but it is a nice simple solution. I just have to run it by our development practices committee, and convince them of the usefulness.