Showing posts from July, 2013

Dependencies Included!

Consider this: What good is a phone without its battery? When we buy phones or any electronic that runs on a battery we expect batteries included with the product.  As software developers, we face the same problem when we write Java application. We want to include dependencies with our final build. We build our project using Maven but our build won't run if we didn't to define dependencies paths for the runtime. Maven can resolve dependencies while compiling/building the project for you but the final build in itself can't resolve dependencies unless you specify where the referenced classes are located. Here is how we typically define dependencies for the runtime: java -cp MyProject.jar:MyCommonLibrary.jar:AnotherDependency.jar com.kondra.myproject.MainClass     This is fine when you have a few dependencies. But that's never the case for software we write at Kondra. Most of the times we have 20 or 25 different dependencies and this means this command