Search code examples
mavenanttransitive-dependency

Managing Maven's Runtime and transitive dependencies in a Non Maven Project


I have created a Maven project (re-usable library) which has many dependencies(Compile time and run time) which also transitively dependent on many others. In maven, i can add the dependencies in pom.xml and its transitive dependencies will be taken care of automatically. So, I will be run without any issues.

Now, i have a Non-Maven(Ant based) project where above library(Maven Lib) created will be using.

  1. In this case, how the RUN TIME & TRANSITIVE dependencies will be managed?
  2. Should we be including the Runtime & Transitive dependents while building the Non-Maven(Ant based) project as well?

Solution

  • yes,you should add all the jars into WEB-INF/lib,and then add classpath dependencies through building path in project.