Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-13174

URL dependency not followed in plugin.xml

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Invalid
    • cordova@7.0.0
    • None
    • cordova-cli

    Description

      I'm using CLI 7.0.1 and I've cloned a version of cordova-plugin-camera locally to do the test.

      In my local copy of cordova-plugin-camera I modify the plugin.xml to change the dependency tag to:

      ```
      <dependency id="cordova-plugin-compat" src="https://github.com/macdonst/cordova-plugin-compat-1" />
      ```

      Then I add the local copy of cordova-plugin-camera to my project via `cordova plugin add ../cordova-plugin-camera`. When I list the plugins for the project I get:

      ```
      cordova-plugin-camera 2.4.2-dev "Camera"
      cordova-plugin-compat 1.1.0 "Compat"
      cordova-plugin-whitelist 1.3.2 "Whitelist"
      ```

      but I'm expecting Compat to be 1.2.0-dev which is what is in the repo I'm linking to from dependencies.

      It seems like when the camera plugin is installed it reads the id of the dependent plugin and installs it from npm instead of following the url.

      Switching to:

      ```
      <dependency id="cordova-plugin-fake-news" src="https://github.com/macdonst/cordova-plugin-compat-1" />
      ```

      causes cordova-plugin-camera to fail to install. Removing the id from the dependency tag results in this error:

      Error: <dependency> tag is missing id attribute in /Users/smacdona/code/cordova/compattest/plugins/cordova-plugin-camera/plugin.xml

      Using --nofetch when trying to add the plugin has no effect.

      Attachments

        Activity

          People

            macdonst Simon MacDonald
            macdonst Simon MacDonald
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: