I've just created a Hibernate Java Project and I see that IntelliJ Idea creates a lib directory with some usefull jars inside and a src directory to write your code.
When I tried to connect to my local mysql database IntelliJ downloaded the mysql-connector-java-5.1.22-bin.jar and I've told it to place it in this lib directory.
When I tried to use this driver in my hibernate.cfg.xml IntelliJ Idea couldn't find a class I wanted and the problem solved only when I manually declared this jar as a module dependency.
What exactly does this declaration does?
Does it extract the jar file somewhere?
Thank you.