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

Version 1.0.13 doesn't respect RepositoryMap.xml content. #55

Closed denis-anisimov closed 7 years ago

denis-anisimov commented 7 years ago

Version 1.0.12 (by the way your Changelog file has incorrect versions, e.g. it refers to 1.13.0 instead of 1.0.13) respects the content of custom RepositoryMap.xml : I have only chromedriver specified there. As a result only chromedriver is downloaded. Version 1.0.13 downloads every windows driver even if it's not specified in the RepositoryMap.xml .

Here is the content of the RepositoryMap.xml :

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<root>
    <windows>
        <driver id="googlechrome">
            <version id="2.29">
                <bitrate thirtytwobit="true" sixtyfourbit="true">
                    <filelocation>http://chromedriver.storage.googleapis.com/2.29/chromedriver_win32.zip
                    </filelocation>
                    <hash>2f02f28d3ff1b8f2a63cb3bc32c26ade60ac4737</hash>
                    <hashtype>sha1</hashtype>
                </bitrate>
            </version>
        </driver>
    </windows>
    <linux>
        <driver id="googlechrome">
            <version id="2.29">
                <bitrate sixtyfourbit="true">
                    <filelocation>http://chromedriver.storage.googleapis.com/2.29/chromedriver_linux64.zip
                    </filelocation>
                    <hash>025a098cde0a6ad8aef53d6734979c9845bf49b5</hash>
                    <hashtype>sha1</hashtype>
                </bitrate>
            </version>
        </driver>
    </linux>
    <osx>
        <driver id="googlechrome">
            <version id="2.29">
                <bitrate thirtytwobit="true" sixtyfourbit="true">
                    <filelocation>http://chromedriver.storage.googleapis.com/2.29/chromedriver_mac64.zip
                    </filelocation>
                    <hash>cec18df4ef736d6712593faf91b462352217214a</hash>
                    <hashtype>sha1</hashtype>
                </bitrate>
            </version>
        </driver>
    </osx>
</root>

Only chrome driver should be downloaded. Nothing else.

denis-anisimov commented 7 years ago

It looks like the issue is in the plugin config. The plugin is configured in this way:

<configuration>
    <onlyGetDriversForHostOperatingSystem>true</onlyGetDriversForHostOperatingSystem>
    <rootStandaloneServerDirectory>../driver</rootStandaloneServerDirectory>
    <downloadedZipFileDirectory>../driver_zips</downloadedZipFileDirectory>
    <customRepositoryMap>../drivers.xml</customRepositoryMap>
</configuration>

As a result the content of the drivers.xml (which is in the parent directory) is completely ignored. That's why it downloads all drivers for the given operation system. It downloads other driver than specified in the drivers.xml. So it looks like relative reference to the parent folder is the issue. Paths in the other options works fine (e.g. downloadedZipFileDirectory).