I understand the difference between runtime and compile-time and how to differentiate between the two, but I just don\'t see the need to make a distinction between compile-t
Just ran into an issue that answers your question. servlet-api.jar
is a transient dependency in my web project and is needed both at compile time and runtime. But servlet-api.jar
is also included in my Tomcat library.
The solution here is to make servlet-api.jar
in maven available only at compile time and not packaged in my war file so that it would not clash with the servlet-api.jar
contained in my Tomcat library.
I hope this explains Compile time and Runtime dependency.