Ardesco / driver-binary-downloader-maven-plugin

A Maven plugin that will download the WebDriver stand alone server executables for use in your mavenised Selenium project.
Apache License 2.0
92 stars 52 forks source link

Hashes are required, even if setting is disabled #28

Open jeffnyman opened 9 years ago

jeffnyman commented 9 years ago

Unless I'm misunderstanding how things work, I have the following setting in place:

 <checkFileHashes>false</checkFileHashes>

This is in the configuration area. However, even with this in place, I still get the following error if I don't have hashes:

Failed to execute goal com.lazerycode.selenium:driver-binary-downloader-
maven-plugin:1.0.7:selenium (default) on project lucid: RepositoryMap.xml is
not valid: cvc-complex-type.2.4.b: The content of element 'bitrate' is not
complete. One of '{hash}' is expected.

The reason I'm trying to run without the hashes is that it's not clear to me where to get them. For example, I have the following in place:

<filelocation>http://chromedriver.storage.googleapis.com/2.19/chromedriver_mac32.zip</filelocation>

When I look at the download location (http://chromedriver.storage.googleapis.com/), I don't see a hash. I see an etag, but that's about it. The etag is this:

259bb87f4ebf3b0bc4792ed203bd69f5

But the hash that is expected is:

64ef44893a87a0e470b60ff8f5fc83a588b78023
Ardesco commented 9 years ago

Originally the plugin didn't work unless the hash was valid. The checkFileHashes option was added when some people requested a way to download files without checking the hash.

The plugin is designed to use hashes because this is how it checks that the file it has downloaded is correct. As a result the RepositoryMap.xml has an XSD that requires the hash field to be filled in.

To get the hash of a file you can do the following on the command line in OSX/Linux:

openssl sha1 <FileYouWantAHashFor>
openssl md5 <FileYouWantAHashFor>

For windows have a look at:

https://support.microsoft.com/en-us/kb/889768

It looks like the chromedriver team no longer supply MD5 or SHA1 hashes of their files so that you can check that your download is not corrupt and is the expected file, this is disappointing.