cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michal Mocny <>
Subject Re: Non-Git Plugin Dependencies
Date Wed, 04 Sep 2013 02:27:00 GMT
Mulling this over a bit, I think I would like a solution for specifying
dependancies that would work regardless of where/how the plugins are
hosted, git or local.  If you had:

- plug1/
- plug2/

(and plug1 depends on plug2), then:

cordova plugin add LOCAL/PATH/TO/BB_PLUGINS/plug1    ..and..   cordova
plugin add GIT_REPO:BB_PLUGINS/plug1

..should both work without changing all of the dependency tags in plug1.
 Actually, the plugin author should not have an explicit say in how a user
manages these directories (except in the directory structure).  Note that
this situation applies whenever a user clones your plugin repo to locally,
or for the reverse direction, when ever they add your plugins into their
teams' git repo.

Right now, thats not possible, because when installing from local path with
url="." there is no way to know which of the plugins parent directories to
consider as the "root".  We could resolve this using several ways, among

(1) Jeffreys proposal: dropping the url="." means "path relative to this
plugin" (note however, that I propose it also works when installing from a
git repo).  Deprecate/warn against using url=".".

(2) Support a new special file to "mark" the plugin root dir so we can walk
the directory tree to find the valid target for url="." (ie, replace the
requirement for a .git with a requirement for a .cordova_repo, which BB and
others could place within their plugin bundle).

I like (1).


On Tue, Sep 3, 2013 at 9:54 PM, Michal Mocny <> wrote:

> Sounds reasonable to me.
> Conceptually, I'm not sure why the syntax for (2) shouldn't do what you
> request when the url for the original plugin was a local path?  Maybe just
> a bug?
> -Michal
> On Tue, Sep 3, 2013 at 9:38 PM, Jeffrey Heifetz <>wrote:
>> We were working on a redistribution of Cordova that included some plugins
>> and ran into a use-case not covered by the current plugin spec.[1]
>> Currently there are two ways to specify a dependency
>> 1. Using a combination of url, commit and subdir which plugman will use
>> to clone down a repo and install
>> 2. Set the url to ".", skip the commit and specify a subdir relative to
>> the root of the repo. Plugman then runs git-rev parse to find the root and
>> install from there.
>> I would like to propose a third way which would be relative to the
>> current install and not use git at all
>> 3. Skip the url, skip the commit and specify a subdir relative to the
>> current plugin.xml.
>> This would allow us to distribute a version of cordova with plugins to
>> anyone without an unnecessary requirement on git (considering the plugins
>> are fully installed)
>> 1.
>> ---------------------------------------------------------------------
>> This transmission (including any attachments) may contain confidential
>> information, privileged material (including material protected by the
>> solicitor-client or other applicable privileges), or constitute non-public
>> information. Any use of this information by anyone other than the intended
>> recipient is prohibited. If you have received this transmission in error,
>> please immediately reply to the sender and delete this information from
>> your system. Use, dissemination, distribution, or reproduction of this
>> transmission by unintended recipients is not authorized and may be unlawful.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message