postgres jar checked in to git

Ian Springer ian.springer at redhat.com
Tue Jul 12 22:01:04 UTC 2011


I just noticed this in a recent checkin:
>> .../test/resources/postgresql-9.0-801.jdbc4.jar    |  Bin 539705 ->
>> 539705 bytes
>>
>> It's preferable to avoid checking jars and other binaries into git when
>> possible.
>>
> Hm. I hear what you say. How can I make sure that this dependency
> does not change - meaning the above jar is a test dependency, that
> will make the test fail if e.g. 9.0-802... is used.

I'm not sure how you load the jar in your test code, but if you use a 
URL classloader, you should be able to load it explicitly by name from 
the classpath and fail if it can't be found, i.e.:

classloader.loadResource("/postgresql-9.0-801.jdbc4.jar")

And in the pom, explicitly specify version=9.0-801.jdbc4 to avoid 
inheriting the depMgmt version specified in the root pom.



More information about the rhq-devel mailing list