Reputation: 43
I have a very specific maven/c3p0/hibernate related question. I have a web archive project that relies on c3p0 for connection pooling and have accidentally used the old c3p0 dependency (0.9.1) in my project.
I've only recently noticed my mistake and want to upgrade to the latest version, so I deleted the old dependency in my pom.xml and added the new one (com.mchange.cp3 instead).
Now after cleaning and building and running my project on my server, I notice it's still using the old version... Even deleting the old jar files will cause maven to redownload these and use them again.
Can anyone point me in the right direction on how to solve this?
Thanks in advance!
Upvotes: 2
Views: 1104
Reputation: 4078
Run mvn dependency:tree -Dverbose -Dincludes=c3p0
in terminal (most IDE's also have their version of this, in Eclipse it'd be the Dependency hierarchy
tab on pom.xml) and check if it's a transitive dependency of some other dependency you're including. If so, use <exclude>
tags to refrain those dependencies from adding the old version into the JAR.
Upvotes: 2