Note: I am talking about a Java application, specifically, focusing on Apache Axis libraries.
Can compile dependency version and runtime dependency version be different ?
Let's say, you are developing an application. And this application uses some 3rd party libraries. In my case, using Apache Axis libraries. When a 3rd party library says: compile dependency requires NewVersion of a jar. Can I deduce that, even at runtime, my application server should provide versionA of the same jar?
Can I deduce that, since, at compile time, NewVersion is being used, my application code should be modified as per that version? (so, I cannot assume that, magically, my application will still work, if OldVersion of the same jar is deployed by application server ).
If someone is interested, have a look at this page from Apache Synapse - https://synapse.apache.org/dependency-management.html
It says that, it requires Apache Axis2 with version 1.7.7 for many of the jars. Now, our application is written assuming 1.6.2. So, should I go ahead and update my code , as per 1.7.7, since the basic premise is that upgrading to Apache Synapse 3.0.1, brings the entire family stack of Apache Axis2 also?
- Is it possible, in theory/practice, to compile our application with 3rd party library of versionA and run our application with the same 3rd party library of versionB ?