sometimes you know it, here you need to have the api and transaction for Connector and Transaction stuff.
In case of self build applications you should also know what you need.
In case of third party libs the vendor should declare the dependencies.
Also you will run into ClassNotFound Exceptions if a dependency is not declared.