I want to use several standard third-party libs (e.g. Apache’s log4j) for a small Java project I’m working on. I know how to configure my IDE, Eclipse, so that these libraries are available during my development work, but I don’t know how to build the distributions for my app so that, when necessary, these external libraries get properly installed in the target system.
One approach I have seen is to treat these external libraries as if they were internal to the project, even checking them into Git or subversion or whatever along with the code that is truly being developed.
What I most dislike of this approach, at least for what I’m working with at the moment, is that the total disk footprint of these external libraries more than 10x the footprint of my app proper (which, as I said, is pretty small and simple).
Is there a better approach?
PS: I’ve heard about Maven and that it’s supposed to handle these issues, but it looks like overkill for the relatively small and simple project I’m dealing with here.
I haven’t built a java app in years without maven. No matter how big or small, having something manage dependencies for you is great. The dependency plugin is awesome for when you actually want to deploy to an end server and need to get all of your deps local. I don’t think any project is too small for a simple POM file.