You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by st...@apache.org on 2017/05/02 00:08:56 UTC

[36/68] [abbrv] cordova-lib git commit: CB-11242: updated tests and fixtures

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/f0e19e8c/cordova-lib/spec-plugman/projects/android/cordova/node_modules/cordova-common/src/PluginInfo/PluginInfoProvider.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android/cordova/node_modules/cordova-common/src/PluginInfo/PluginInfoProvider.js b/cordova-lib/spec-plugman/projects/android/cordova/node_modules/cordova-common/src/PluginInfo/PluginInfoProvider.js
new file mode 100644
index 0000000..6240119
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/android/cordova/node_modules/cordova-common/src/PluginInfo/PluginInfoProvider.js
@@ -0,0 +1,82 @@
+/**
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+*/
+
+/* jshint sub:true, laxcomma:true, laxbreak:true */
+
+var fs = require('fs');
+var path = require('path');
+var PluginInfo = require('./PluginInfo');
+var events = require('../events');
+
+function PluginInfoProvider() {
+    this._cache = {};
+    this._getAllCache = {};
+}
+
+PluginInfoProvider.prototype.get = function(dirName) {
+    var absPath = path.resolve(dirName);
+    if (!this._cache[absPath]) {
+        this._cache[absPath] = new PluginInfo(dirName);
+    }
+    return this._cache[absPath];
+};
+
+// Normally you don't need to put() entries, but it's used
+// when copying plugins, and in unit tests.
+PluginInfoProvider.prototype.put = function(pluginInfo) {
+    var absPath = path.resolve(pluginInfo.dir);
+    this._cache[absPath] = pluginInfo;
+};
+
+// Used for plugin search path processing.
+// Given a dir containing multiple plugins, create a PluginInfo object for
+// each of them and return as array.
+// Should load them all in parallel and return a promise, but not yet.
+PluginInfoProvider.prototype.getAllWithinSearchPath = function(dirName) {
+    var absPath = path.resolve(dirName);
+    if (!this._getAllCache[absPath]) {
+        this._getAllCache[absPath] = getAllHelper(absPath, this);
+    }
+    return this._getAllCache[absPath];
+};
+
+function getAllHelper(absPath, provider) {
+    if (!fs.existsSync(absPath)){
+        return [];
+    }
+    // If dir itself is a plugin, return it in an array with one element.
+    if (fs.existsSync(path.join(absPath, 'plugin.xml'))) {
+        return [provider.get(absPath)];
+    }
+    var subdirs = fs.readdirSync(absPath);
+    var plugins = [];
+    subdirs.forEach(function(subdir) {
+        var d = path.join(absPath, subdir);
+        if (fs.existsSync(path.join(d, 'plugin.xml'))) {
+            try {
+                plugins.push(provider.get(d));
+            } catch (e) {
+                events.emit('warn', 'Error parsing ' + path.join(d, 'plugin.xml.\n' + e.stack));
+            }
+        }
+    });
+    return plugins;
+}
+
+module.exports = PluginInfoProvider;

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/f0e19e8c/cordova-lib/spec-plugman/projects/android/cordova/node_modules/cordova-common/src/PluginManager.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android/cordova/node_modules/cordova-common/src/PluginManager.js b/cordova-lib/spec-plugman/projects/android/cordova/node_modules/cordova-common/src/PluginManager.js
new file mode 100644
index 0000000..0bcaf59
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/android/cordova/node_modules/cordova-common/src/PluginManager.js
@@ -0,0 +1,152 @@
+/*
+       Licensed to the Apache Software Foundation (ASF) under one
+       or more contributor license agreements.  See the NOTICE file
+       distributed with this work for additional information
+       regarding copyright ownership.  The ASF licenses this file
+       to you under the Apache License, Version 2.0 (the
+       "License"); you may not use this file except in compliance
+       with the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+       Unless required by applicable law or agreed to in writing,
+       software distributed under the License is distributed on an
+       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+       KIND, either express or implied.  See the License for the
+       specific language governing permissions and limitations
+       under the License.
+*/
+
+var Q = require('q');
+var fs = require('fs');
+var path = require('path');
+
+var ActionStack = require('./ActionStack');
+var PlatformJson = require('./PlatformJson');
+var CordovaError = require('./CordovaError/CordovaError');
+var PlatformMunger = require('./ConfigChanges/ConfigChanges').PlatformMunger;
+var PluginInfoProvider = require('./PluginInfo/PluginInfoProvider');
+
+/**
+ * @constructor
+ * @class PluginManager
+ * Represents an entity for adding/removing plugins for platforms
+ *
+ * @param {String} platform Platform name
+ * @param {Object} locations - Platform files and directories
+ * @param {IDEProject} ideProject The IDE project to add/remove plugin changes to/from
+ */
+function PluginManager(platform, locations, ideProject) {
+    this.platform = platform;
+    this.locations = locations;
+    this.project = ideProject;
+
+    var platformJson = PlatformJson.load(locations.root, platform);
+    this.munger = new PlatformMunger(platform, locations.root, platformJson, new PluginInfoProvider());
+}
+
+
+/**
+ * @constructs PluginManager
+ * A convenience shortcut to new PluginManager(...)
+ *
+ * @param {String} platform Platform name
+ * @param {Object} locations - Platform files and directories
+ * @param {IDEProject} ideProject The IDE project to add/remove plugin changes to/from
+ * @returns new PluginManager instance
+ */
+PluginManager.get = function(platform, locations, ideProject) {
+    return new PluginManager(platform, locations, ideProject);
+};
+
+PluginManager.INSTALL = 'install';
+PluginManager.UNINSTALL = 'uninstall';
+
+module.exports = PluginManager;
+
+/**
+ * Describes and implements common plugin installation/uninstallation routine. The flow is the following:
+ *  * Validate and set defaults for options. Note that options are empty by default. Everything
+ *    needed for platform IDE project must be passed from outside. Plugin variables (which
+ *    are the part of the options) also must be already populated with 'PACKAGE_NAME' variable.
+ *  * Collect all plugin's native and web files, get installers/uninstallers and process
+ *    all these via ActionStack.
+ *  * Save the IDE project, so the changes made by installers are persisted.
+ *  * Generate config changes munge for plugin and apply it to all required files
+ *  * Generate metadata for plugin and plugin modules and save it to 'cordova_plugins.js'
+ *
+ * @param {PluginInfo} plugin A PluginInfo structure representing plugin to install
+ * @param {Object} [options={}] An installation options. It is expected but is not necessary
+ *   that options would contain 'variables' inner object with 'PACKAGE_NAME' field set by caller.
+ *
+ * @returns {Promise} Returns a Q promise, either resolved in case of success, rejected otherwise.
+ */
+PluginManager.prototype.doOperation = function (operation, plugin, options) {
+    if (operation !== PluginManager.INSTALL && operation !== PluginManager.UNINSTALL)
+        return Q.reject(new CordovaError('The parameter is incorrect. The opeation must be either "add" or "remove"'));
+
+    if (!plugin || plugin.constructor.name !== 'PluginInfo')
+        return Q.reject(new CordovaError('The parameter is incorrect. The first parameter should be a PluginInfo instance'));
+
+    // Set default to empty object to play safe when accesing properties
+    options = options || {};
+
+    var self = this;
+    var actions = new ActionStack();
+
+    // gather all files need to be handled during operation ...
+    plugin.getFilesAndFrameworks(this.platform)
+        .concat(plugin.getAssets(this.platform))
+        .concat(plugin.getJsModules(this.platform))
+    // ... put them into stack ...
+    .forEach(function(item) {
+        var installer = self.project.getInstaller(item.itemType);
+        var uninstaller = self.project.getUninstaller(item.itemType);
+        var actionArgs = [item, plugin, self.project, options];
+
+        var action;
+        if (operation === PluginManager.INSTALL) {
+            action = actions.createAction.apply(actions, [installer, actionArgs, uninstaller, actionArgs]);
+        } else /* op === PluginManager.UNINSTALL */{
+            action = actions.createAction.apply(actions, [uninstaller, actionArgs, installer, actionArgs]);
+        }
+        actions.push(action);
+    });
+
+    // ... and run through the action stack
+    return actions.process(this.platform)
+    .then(function () {
+        if (self.project.write) {
+            self.project.write();
+        }
+
+        if (operation === PluginManager.INSTALL) {
+            // Ignore passed `is_top_level` option since platform itself doesn't know
+            // anything about managing dependencies - it's responsibility of caller.
+            self.munger.add_plugin_changes(plugin, options.variables, /*is_top_level=*/true, /*should_increment=*/true, options.force);
+            self.munger.platformJson.addPluginMetadata(plugin);
+        } else {
+            self.munger.remove_plugin_changes(plugin, /*is_top_level=*/true);
+            self.munger.platformJson.removePluginMetadata(plugin);
+        }
+
+        // Save everything (munge and plugin/modules metadata)
+        self.munger.save_all();
+
+        var metadata = self.munger.platformJson.generateMetadata();
+        fs.writeFileSync(path.join(self.locations.www, 'cordova_plugins.js'), metadata, 'utf-8');
+
+        // CB-11022 save plugin metadata to both www and platform_www if options.usePlatformWww is specified
+        if (options.usePlatformWww) {
+            fs.writeFileSync(path.join(self.locations.platformWww, 'cordova_plugins.js'), metadata, 'utf-8');
+        }
+    });
+};
+
+PluginManager.prototype.addPlugin = function (plugin, installOptions) {
+    return this.doOperation(PluginManager.INSTALL, plugin, installOptions);
+};
+
+PluginManager.prototype.removePlugin = function (plugin, uninstallOptions) {
+    return this.doOperation(PluginManager.UNINSTALL, plugin, uninstallOptions);
+};

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/f0e19e8c/cordova-lib/spec-plugman/projects/android/cordova/node_modules/cordova-common/src/events.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android/cordova/node_modules/cordova-common/src/events.js b/cordova-lib/spec-plugman/projects/android/cordova/node_modules/cordova-common/src/events.js
new file mode 100644
index 0000000..e702bd8
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/android/cordova/node_modules/cordova-common/src/events.js
@@ -0,0 +1,72 @@
+/**
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+*/
+
+var EventEmitter = require('events').EventEmitter;
+
+var INSTANCE = new EventEmitter();
+var EVENTS_RECEIVER;
+
+module.exports = INSTANCE;
+
+/**
+ * Sets up current instance to forward emitted events to another EventEmitter
+ *   instance.
+ *
+ * @param   {EventEmitter}  [eventEmitter]  The emitter instance to forward
+ *   events to. Falsy value, when passed, disables forwarding.
+ */
+module.exports.forwardEventsTo = function (eventEmitter) {
+
+    // If no argument is specified disable events forwarding
+    if (!eventEmitter) {
+        EVENTS_RECEIVER = undefined;
+        return;
+    }
+
+    if (!(eventEmitter instanceof EventEmitter))
+        throw new Error('Cordova events can be redirected to another EventEmitter instance only');
+
+    // CB-10940 Skipping forwarding to self to avoid infinite recursion.
+    // This is the case when the modules are npm-linked.
+    if (this !== eventEmitter) {
+        EVENTS_RECEIVER = eventEmitter;
+    } else {
+        // Reset forwarding if we are subscribing to self
+        EVENTS_RECEIVER = undefined;
+    }
+};
+
+var emit = INSTANCE.emit;
+
+/**
+ * This method replaces original 'emit' method to allow events forwarding.
+ *
+ * @return  {eventEmitter}  Current instance to allow calls chaining, as
+ *   original 'emit' does
+ */
+module.exports.emit = function () {
+
+    var args = Array.prototype.slice.call(arguments);
+
+    if (EVENTS_RECEIVER) {
+        EVENTS_RECEIVER.emit.apply(EVENTS_RECEIVER, args);
+    }
+
+    return emit.apply(this, args);
+};

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/f0e19e8c/cordova-lib/spec-plugman/projects/android/cordova/node_modules/cordova-common/src/superspawn.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android/cordova/node_modules/cordova-common/src/superspawn.js b/cordova-lib/spec-plugman/projects/android/cordova/node_modules/cordova-common/src/superspawn.js
new file mode 100644
index 0000000..96ec09d
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/android/cordova/node_modules/cordova-common/src/superspawn.js
@@ -0,0 +1,190 @@
+/**
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+*/
+
+var child_process = require('child_process');
+var fs = require('fs');
+var path = require('path');
+var _ = require('underscore');
+var Q = require('q');
+var shell = require('shelljs');
+var events = require('./events');
+var iswin32 = process.platform == 'win32';
+
+// On Windows, spawn() for batch files requires absolute path & having the extension.
+function resolveWindowsExe(cmd) {
+    var winExtensions = ['.exe', '.bat', '.cmd', '.js', '.vbs'];
+    function isValidExe(c) {
+        return winExtensions.indexOf(path.extname(c)) !== -1 && fs.existsSync(c);
+    }
+    if (isValidExe(cmd)) {
+        return cmd;
+    }
+    cmd = shell.which(cmd) || cmd;
+    if (!isValidExe(cmd)) {
+        winExtensions.some(function(ext) {
+            if (fs.existsSync(cmd + ext)) {
+                cmd = cmd + ext;
+                return true;
+            }
+        });
+    }
+    return cmd;
+}
+
+function maybeQuote(a) {
+    if (/^[^"].*[ &].*[^"]/.test(a)) return '"' + a + '"';
+    return a;
+}
+
+/**
+ * A special implementation for child_process.spawn that handles
+ *   Windows-specific issues with batch files and spaces in paths. Returns a
+ *   promise that succeeds only for return code 0. It is also possible to
+ *   subscribe on spawned process' stdout and stderr streams using progress
+ *   handler for resultant promise.
+ *
+ * @example spawn('mycommand', [], {stdio: 'pipe'}) .progress(function (stdio){
+ *   if (stdio.stderr) { console.error(stdio.stderr); } })
+ *   .then(function(result){ // do other stuff })
+ *
+ * @param   {String}   cmd       A command to spawn
+ * @param   {String[]} [args=[]]  An array of arguments, passed to spawned
+ *   process
+ * @param   {Object}   [opts={}]  A configuration object
+ * @param   {String|String[]|Object} opts.stdio Property that configures how
+ *   spawned process' stdio will behave. Has the same meaning and possible
+ *   values as 'stdio' options for child_process.spawn method
+ *   (https://nodejs.org/api/child_process.html#child_process_options_stdio).
+ * @param {Object}     [env={}]  A map of extra environment variables
+ * @param {String}     [cwd=process.cwd()]  Working directory for the command
+ * @param {Boolean}    [chmod=false]  If truthy, will attempt to set the execute
+ *   bit before executing on non-Windows platforms
+ *
+ * @return  {Promise}        A promise that is either fulfilled if the spawned
+ *   process is exited with zero error code or rejected otherwise. If the
+ *   'stdio' option set to 'default' or 'pipe', the promise also emits progress
+ *   messages with the following contents:
+ *   {
+ *       'stdout': ...,
+ *       'stderr': ...
+ *   }
+ */
+exports.spawn = function(cmd, args, opts) {
+    args = args || [];
+    opts = opts || {};
+    var spawnOpts = {};
+    var d = Q.defer();
+
+    if (iswin32) {
+        cmd = resolveWindowsExe(cmd);
+        // If we couldn't find the file, likely we'll end up failing,
+        // but for things like "del", cmd will do the trick.
+        if (path.extname(cmd) != '.exe') {
+            var cmdArgs = '"' + [cmd].concat(args).map(maybeQuote).join(' ') + '"';
+            // We need to use /s to ensure that spaces are parsed properly with cmd spawned content
+            args = [['/s', '/c', cmdArgs].join(' ')];
+            cmd = 'cmd';
+            spawnOpts.windowsVerbatimArguments = true;
+        } else if (!fs.existsSync(cmd)) {
+            // We need to use /s to ensure that spaces are parsed properly with cmd spawned content
+            args = ['/s', '/c', cmd].concat(args).map(maybeQuote);
+        }
+    }
+
+    if (opts.stdio !== 'default') {
+        // Ignore 'default' value for stdio because it corresponds to child_process's default 'pipe' option
+        spawnOpts.stdio = opts.stdio;
+    }
+
+    if (opts.cwd) {
+        spawnOpts.cwd = opts.cwd;
+    }
+
+    if (opts.env) {
+        spawnOpts.env = _.extend(_.extend({}, process.env), opts.env);
+    }
+
+    if (opts.chmod && !iswin32) {
+        try {
+            // This fails when module is installed in a system directory (e.g. via sudo npm install)
+            fs.chmodSync(cmd, '755');
+        } catch (e) {
+            // If the perms weren't set right, then this will come as an error upon execution.
+        }
+    }
+
+    events.emit(opts.printCommand ? 'log' : 'verbose', 'Running command: ' + maybeQuote(cmd) + ' ' + args.map(maybeQuote).join(' '));
+
+    var child = child_process.spawn(cmd, args, spawnOpts);
+    var capturedOut = '';
+    var capturedErr = '';
+
+    if (child.stdout) {
+        child.stdout.setEncoding('utf8');
+        child.stdout.on('data', function(data) {
+            capturedOut += data;
+            d.notify({'stdout': data});
+        });
+    }
+
+    if (child.stderr) {
+        child.stderr.setEncoding('utf8');
+        child.stderr.on('data', function(data) {
+            capturedErr += data;
+            d.notify({'stderr': data});
+        });
+    }
+
+    child.on('close', whenDone);
+    child.on('error', whenDone);
+    function whenDone(arg) {
+        child.removeListener('close', whenDone);
+        child.removeListener('error', whenDone);
+        var code = typeof arg == 'number' ? arg : arg && arg.code;
+
+        events.emit('verbose', 'Command finished with error code ' + code + ': ' + cmd + ' ' + args);
+        if (code === 0) {
+            d.resolve(capturedOut.trim());
+        } else {
+            var errMsg = cmd + ': Command failed with exit code ' + code;
+            if (capturedErr) {
+                errMsg += ' Error output:\n' + capturedErr.trim();
+            }
+            var err = new Error(errMsg);
+            if (capturedErr) {
+                err.stderr = capturedErr;
+            }
+            if (capturedOut) {
+                err.stdout = capturedOut;
+            }
+            err.code = code;
+            d.reject(err);
+        }
+    }
+
+    return d.promise;
+};
+
+exports.maybeSpawn = function(cmd, args, opts) {
+    if (fs.existsSync(cmd)) {
+        return exports.spawn(cmd, args, opts);
+    }
+    return Q(null);
+};
+

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/f0e19e8c/cordova-lib/spec-plugman/projects/android/cordova/node_modules/cordova-common/src/util/addProperty.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android/cordova/node_modules/cordova-common/src/util/addProperty.js b/cordova-lib/spec-plugman/projects/android/cordova/node_modules/cordova-common/src/util/addProperty.js
new file mode 100644
index 0000000..7dc4dc1
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/android/cordova/node_modules/cordova-common/src/util/addProperty.js
@@ -0,0 +1,32 @@
+/*
+       Licensed to the Apache Software Foundation (ASF) under one
+       or more contributor license agreements.  See the NOTICE file
+       distributed with this work for additional information
+       regarding copyright ownership.  The ASF licenses this file
+       to you under the Apache License, Version 2.0 (the
+       "License"); you may not use this file except in compliance
+       with the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+       Unless required by applicable law or agreed to in writing,
+       software distributed under the License is distributed on an
+       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+       KIND, either express or implied.  See the License for the
+       specific language governing permissions and limitations
+       under the License.
+*/
+
+module.exports = function addProperty(module, property, modulePath, obj) {
+    
+    obj = obj || module.exports;
+    // Add properties as getter to delay load the modules on first invocation
+    Object.defineProperty(obj, property, {
+        configurable: true,
+        get: function () {
+            var delayLoadedModule = module.require(modulePath);
+            obj[property] = delayLoadedModule;
+            return delayLoadedModule;
+        }
+    });
+};

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/f0e19e8c/cordova-lib/spec-plugman/projects/android/cordova/node_modules/cordova-common/src/util/plist-helpers.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android/cordova/node_modules/cordova-common/src/util/plist-helpers.js b/cordova-lib/spec-plugman/projects/android/cordova/node_modules/cordova-common/src/util/plist-helpers.js
new file mode 100644
index 0000000..38eb31b
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/android/cordova/node_modules/cordova-common/src/util/plist-helpers.js
@@ -0,0 +1,101 @@
+/**
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+*/ 
+
+// contains PLIST utility functions
+var __     = require('underscore');
+var plist = require('plist');
+
+// adds node to doc at selector
+module.exports.graftPLIST = graftPLIST;
+function graftPLIST(doc, xml, selector) {
+    var obj = plist.parse('<plist>'+xml+'</plist>');
+
+    var node = doc[selector];
+    if (node && Array.isArray(node) && Array.isArray(obj)){
+        node = node.concat(obj);
+        for (var i =0;i<node.length; i++){
+            for (var j=i+1; j<node.length; ++j) {
+              if (nodeEqual(node[i], node[j]))
+                    node.splice(j--,1);
+            }
+        }
+        doc[selector] = node;
+    } else {
+        //plist uses objects for <dict>. If we have two dicts we merge them instead of
+        // overriding the old one. See CB-6472
+        if (node && __.isObject(node) && __.isObject(obj) && !__.isDate(node) && !__.isDate(obj)){//arrays checked above
+            __.extend(obj,node);
+        }
+        doc[selector] = obj;
+    }
+
+    return true;
+}
+
+// removes node from doc at selector
+module.exports.prunePLIST = prunePLIST;
+function prunePLIST(doc, xml, selector) {
+    var obj = plist.parse('<plist>'+xml+'</plist>');
+
+    pruneOBJECT(doc, selector, obj);
+
+    return true;
+}
+
+function pruneOBJECT(doc, selector, fragment) {
+    if (Array.isArray(fragment) && Array.isArray(doc[selector])) {
+        var empty = true;
+        for (var i in fragment) {
+            for (var j in doc[selector]) {
+                empty = pruneOBJECT(doc[selector], j, fragment[i]) && empty;
+            }
+        }
+        if (empty)
+        {
+            delete doc[selector];
+            return true;
+        }
+    }
+    else if (nodeEqual(doc[selector], fragment)) {
+        delete doc[selector];
+        return true;
+    }
+
+    return false;
+}
+
+function nodeEqual(node1, node2) {
+    if (typeof node1 != typeof node2)
+        return false;
+    else if (typeof node1 == 'string') {
+        node2 = escapeRE(node2).replace(new RegExp('\\$[a-zA-Z0-9-_]+','gm'),'(.*?)');
+        return new RegExp('^' + node2 + '$').test(node1);
+    }
+    else {
+        for (var key in node2) {
+            if (!nodeEqual(node1[key], node2[key])) return false;
+        }
+        return true;
+    }
+}
+
+// escape string for use in regex
+function escapeRE(str) {
+    return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '$&');
+}

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/f0e19e8c/cordova-lib/spec-plugman/projects/android/cordova/node_modules/cordova-common/src/util/xml-helpers.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android/cordova/node_modules/cordova-common/src/util/xml-helpers.js b/cordova-lib/spec-plugman/projects/android/cordova/node_modules/cordova-common/src/util/xml-helpers.js
new file mode 100644
index 0000000..b4b0490
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/android/cordova/node_modules/cordova-common/src/util/xml-helpers.js
@@ -0,0 +1,366 @@
+/**
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+*/ 
+
+/* jshint sub:true, laxcomma:true */
+
+/**
+ * contains XML utility functions, some of which are specific to elementtree
+ */
+
+var fs = require('fs')
+  , path = require('path')
+  , _ = require('underscore')
+  , et = require('elementtree')
+  ;
+
+  var ROOT = /^\/([^\/]*)/,
+      ABSOLUTE = /^\/([^\/]*)\/(.*)/;
+
+module.exports = {
+    // compare two et.XML nodes, see if they match
+    // compares tagName, text, attributes and children (recursively)
+    equalNodes: function(one, two) {
+        if (one.tag != two.tag) {
+            return false;
+        } else if (one.text.trim() != two.text.trim()) {
+            return false;
+        } else if (one._children.length != two._children.length) {
+            return false;
+        }
+
+        if (!attribMatch(one, two)) return false;
+
+        for (var i = 0; i < one._children.length; i++) {
+            if (!module.exports.equalNodes(one._children[i], two._children[i])) {
+                return false;
+            }
+        }
+
+        return true;
+    },
+
+    // adds node to doc at selector, creating parent if it doesn't exist
+    graftXML: function(doc, nodes, selector, after) {
+        var parent = module.exports.resolveParent(doc, selector);
+        if (!parent) {
+            //Try to create the parent recursively if necessary
+            try {
+                var parentToCreate = et.XML('<' + path.basename(selector) + '>'),
+                    parentSelector = path.dirname(selector);
+
+                this.graftXML(doc, [parentToCreate], parentSelector);
+            } catch (e) {
+                return false;
+            }
+            parent = module.exports.resolveParent(doc, selector);
+            if (!parent) return false;
+        }
+
+        nodes.forEach(function (node) {
+            // check if child is unique first
+            if (uniqueChild(node, parent)) {
+                var children = parent.getchildren();
+                var insertIdx = after ? findInsertIdx(children, after) : children.length;
+
+                //TODO: replace with parent.insert after the bug in ElementTree is fixed
+                parent.getchildren().splice(insertIdx, 0, node);
+            }
+        });
+
+        return true;
+    },
+
+    // adds new attributes to doc at selector
+    // Will only merge if attribute has not been modified already or --force is used
+    graftXMLMerge: function(doc, nodes, selector, xml) {
+        var target = module.exports.resolveParent(doc, selector);
+        if (!target) return false;
+
+        // saves the attributes of the original xml before making changes
+        xml.oldAttrib = _.extend({}, target.attrib);
+
+        nodes.forEach(function (node) {
+            var attributes = node.attrib;
+            for (var attribute in attributes) {
+                target.attrib[attribute] = node.attrib[attribute];
+            }
+        });
+
+        return true;
+    },
+
+    // overwrite all attributes to doc at selector with new attributes
+    // Will only overwrite if attribute has not been modified already or --force is used
+    graftXMLOverwrite: function(doc, nodes, selector, xml) {
+        var target = module.exports.resolveParent(doc, selector);
+        if (!target) return false;
+
+        // saves the attributes of the original xml before making changes
+        xml.oldAttrib = _.extend({}, target.attrib);
+
+        // remove old attributes from target
+        var targetAttributes = target.attrib;
+        for (var targetAttribute in targetAttributes) {
+            delete targetAttributes[targetAttribute];
+        }
+
+        // add new attributes to target
+        nodes.forEach(function (node) {
+            var attributes = node.attrib;
+            for (var attribute in attributes) {
+                target.attrib[attribute] = node.attrib[attribute];
+            }
+        });
+
+        return true;
+    },
+
+    // removes node from doc at selector
+    pruneXML: function(doc, nodes, selector) {
+        var parent = module.exports.resolveParent(doc, selector);
+        if (!parent) return false;
+
+        nodes.forEach(function (node) {
+            var matchingKid = null;
+            if ((matchingKid = findChild(node, parent)) !== null) {
+                // stupid elementtree takes an index argument it doesn't use
+                // and does not conform to the python lib
+                parent.remove(matchingKid);
+            }
+        });
+
+        return true;
+    },
+
+    // restores attributes from doc at selector
+    pruneXMLRestore: function(doc, selector, xml) {
+        var target = module.exports.resolveParent(doc, selector);
+        if (!target) return false;
+
+        if (xml.oldAttrib) {
+            target.attrib = _.extend({}, xml.oldAttrib);
+        }
+
+        return true;
+    },
+
+    prunXMLRemove: function(doc, selector, nodes) {
+        var target = module.exports.resolveParent(doc, selector);
+        if (!target) return false;
+
+        nodes.forEach(function (node) {
+            var attributes = node.attrib;
+            for (var attribute in attributes) {
+                if (target.attrib[attribute]) {
+                    delete target.attrib[attribute];
+                }
+            }
+        });
+
+        return true;
+
+    },
+
+
+    parseElementtreeSync: function (filename) {
+        var contents = fs.readFileSync(filename, 'utf-8');
+        if(contents) {
+            //Windows is the BOM. Skip the Byte Order Mark.
+            contents = contents.substring(contents.indexOf('<'));
+        }
+        return new et.ElementTree(et.XML(contents));
+    },
+
+    resolveParent: function (doc, selector) {
+        var parent, tagName, subSelector;
+
+        // handle absolute selector (which elementtree doesn't like)
+        if (ROOT.test(selector)) {
+            tagName = selector.match(ROOT)[1];
+            // test for wildcard "any-tag" root selector
+            if (tagName == '*' || tagName === doc._root.tag) {
+                parent = doc._root;
+
+                // could be an absolute path, but not selecting the root
+                if (ABSOLUTE.test(selector)) {
+                    subSelector = selector.match(ABSOLUTE)[2];
+                    parent = parent.find(subSelector);
+                }
+            } else {
+                return false;
+            }
+        } else {
+            parent = doc.find(selector);
+        }
+        return parent;
+    }
+};
+
+function findChild(node, parent) {
+    var matchingKids = parent.findall(node.tag)
+      , i, j;
+
+    for (i = 0, j = matchingKids.length ; i < j ; i++) {
+        if (module.exports.equalNodes(node, matchingKids[i])) {
+            return matchingKids[i];
+        }
+    }
+    return null;
+}
+
+function uniqueChild(node, parent) {
+    var matchingKids = parent.findall(node.tag)
+      , i = 0;
+
+    if (matchingKids.length === 0) {
+        return true;
+    } else  {
+        for (i; i < matchingKids.length; i++) {
+            if (module.exports.equalNodes(node, matchingKids[i])) {
+                return false;
+            }
+        }
+        return true;
+    }
+}
+
+// Find the index at which to insert an entry. After is a ;-separated priority list
+// of tags after which the insertion should be made. E.g. If we need to
+// insert an element C, and the rule is that the order of children has to be
+// As, Bs, Cs. After will be equal to "C;B;A".
+function findInsertIdx(children, after) {
+    var childrenTags = children.map(function(child) { return child.tag; });
+    var afters = after.split(';');
+    var afterIndexes = afters.map(function(current) { return childrenTags.lastIndexOf(current); });
+    var foundIndex = _.find(afterIndexes, function(index) { return index != -1; });
+
+    //add to the beginning if no matching nodes are found
+    return typeof foundIndex === 'undefined' ? 0 : foundIndex+1;
+}
+
+var BLACKLIST = ['platform', 'feature','plugin','engine'];
+var SINGLETONS = ['content', 'author', 'name'];
+function mergeXml(src, dest, platform, clobber) {
+    // Do nothing for blacklisted tags.
+    if (BLACKLIST.indexOf(src.tag) != -1) return;
+
+    //Handle attributes
+    Object.getOwnPropertyNames(src.attrib).forEach(function (attribute) {
+        if (clobber || !dest.attrib[attribute]) {
+            dest.attrib[attribute] = src.attrib[attribute];
+        }
+    });
+    //Handle text
+    if (src.text && (clobber || !dest.text)) {
+        dest.text = src.text;
+    }
+    //Handle children
+    src.getchildren().forEach(mergeChild);
+
+    //Handle platform
+    if (platform) {
+        src.findall('platform[@name="' + platform + '"]').forEach(function (platformElement) {
+            platformElement.getchildren().forEach(mergeChild);
+        });
+    }
+
+    //Handle duplicate preference tags (by name attribute)
+    removeDuplicatePreferences(dest);
+
+    function mergeChild (srcChild) {
+        var srcTag = srcChild.tag,
+            destChild = new et.Element(srcTag),
+            foundChild,
+            query = srcTag + '',
+            shouldMerge = true;
+
+        if (BLACKLIST.indexOf(srcTag) !== -1) return;
+
+        if (SINGLETONS.indexOf(srcTag) !== -1) {
+            foundChild = dest.find(query);
+            if (foundChild) {
+                destChild = foundChild;
+                dest.remove(destChild);
+            }
+        } else {
+            //Check for an exact match and if you find one don't add
+            var mergeCandidates = dest.findall(query)
+            .filter(function (foundChild) {
+                return foundChild && textMatch(srcChild, foundChild) && attribMatch(srcChild, foundChild);
+            });
+
+            if (mergeCandidates.length > 0) {
+                destChild = mergeCandidates[0];
+                dest.remove(destChild);
+                shouldMerge = false;
+            }
+        }
+
+        mergeXml(srcChild, destChild, platform, clobber && shouldMerge);
+        dest.append(destChild);
+    }
+
+    function removeDuplicatePreferences(xml) {
+        // reduce preference tags to a hashtable to remove dupes
+        var prefHash = xml.findall('preference[@name][@value]').reduce(function(previousValue, currentValue) {
+            previousValue[ currentValue.attrib.name ] = currentValue.attrib.value;
+            return previousValue;
+        }, {});
+
+        // remove all preferences
+        xml.findall('preference[@name][@value]').forEach(function(pref) {
+            xml.remove(pref);
+        });
+
+        // write new preferences
+        Object.keys(prefHash).forEach(function(key, index) {
+            var element = et.SubElement(xml, 'preference');
+            element.set('name', key);
+            element.set('value', this[key]);
+        }, prefHash);
+    }
+}
+
+// Expose for testing.
+module.exports.mergeXml = mergeXml;
+
+function textMatch(elm1, elm2) {
+    var text1 = elm1.text ? elm1.text.replace(/\s+/, '') : '',
+        text2 = elm2.text ? elm2.text.replace(/\s+/, '') : '';
+    return (text1 === '' || text1 === text2);
+}
+
+function attribMatch(one, two) {
+    var oneAttribKeys = Object.keys(one.attrib);
+    var twoAttribKeys = Object.keys(two.attrib);
+
+    if (oneAttribKeys.length != twoAttribKeys.length) {
+        return false;
+    }
+
+    for (var i = 0; i < oneAttribKeys.length; i++) {
+        var attribName = oneAttribKeys[i];
+
+        if (one.attrib[attribName] != two.attrib[attribName]) {
+            return false;
+        }
+    }
+
+    return true;
+}

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/f0e19e8c/cordova-lib/spec-plugman/projects/android/cordova/node_modules/cordova-registry-mapper/.npmignore
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android/cordova/node_modules/cordova-registry-mapper/.npmignore b/cordova-lib/spec-plugman/projects/android/cordova/node_modules/cordova-registry-mapper/.npmignore
new file mode 100644
index 0000000..3c3629e
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/android/cordova/node_modules/cordova-registry-mapper/.npmignore
@@ -0,0 +1 @@
+node_modules

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/f0e19e8c/cordova-lib/spec-plugman/projects/android/cordova/node_modules/cordova-registry-mapper/.travis.yml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android/cordova/node_modules/cordova-registry-mapper/.travis.yml b/cordova-lib/spec-plugman/projects/android/cordova/node_modules/cordova-registry-mapper/.travis.yml
new file mode 100644
index 0000000..ae381fc
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/android/cordova/node_modules/cordova-registry-mapper/.travis.yml
@@ -0,0 +1,7 @@
+language: node_js
+sudo: false 
+node_js:
+  - "0.10"
+install: npm install
+script:
+  - npm test

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/f0e19e8c/cordova-lib/spec-plugman/projects/android/cordova/node_modules/cordova-registry-mapper/README.md
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android/cordova/node_modules/cordova-registry-mapper/README.md b/cordova-lib/spec-plugman/projects/android/cordova/node_modules/cordova-registry-mapper/README.md
new file mode 100644
index 0000000..3b93e5f
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/android/cordova/node_modules/cordova-registry-mapper/README.md
@@ -0,0 +1,14 @@
+[![Build Status](https://travis-ci.org/stevengill/cordova-registry-mapper.svg?branch=master)](https://travis-ci.org/stevengill/cordova-registry-mapper)
+
+#Cordova Registry Mapper
+
+This module is used to map Cordova plugin ids to package names and vice versa.
+
+When Cordova users add plugins to their projects using ids
+(e.g. `cordova plugin add org.apache.cordova.device`),
+this module will map that id to the corresponding package name so `cordova-lib` knows what to fetch from **npm**.
+
+This module was created so the Apache Cordova project could migrate its plugins from
+the [Cordova Registry](http://registry.cordova.io/)
+to [npm](https://registry.npmjs.com/)
+instead of having to maintain a registry.

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/f0e19e8c/cordova-lib/spec-plugman/projects/android/cordova/node_modules/cordova-registry-mapper/index.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android/cordova/node_modules/cordova-registry-mapper/index.js b/cordova-lib/spec-plugman/projects/android/cordova/node_modules/cordova-registry-mapper/index.js
new file mode 100644
index 0000000..4550774
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/android/cordova/node_modules/cordova-registry-mapper/index.js
@@ -0,0 +1,204 @@
+var map = {
+    'org.apache.cordova.battery-status':'cordova-plugin-battery-status',
+    'org.apache.cordova.camera':'cordova-plugin-camera',
+    'org.apache.cordova.console':'cordova-plugin-console',
+    'org.apache.cordova.contacts':'cordova-plugin-contacts',
+    'org.apache.cordova.device':'cordova-plugin-device',
+    'org.apache.cordova.device-motion':'cordova-plugin-device-motion',
+    'org.apache.cordova.device-orientation':'cordova-plugin-device-orientation',
+    'org.apache.cordova.dialogs':'cordova-plugin-dialogs',
+    'org.apache.cordova.file':'cordova-plugin-file',
+    'org.apache.cordova.file-transfer':'cordova-plugin-file-transfer',
+    'org.apache.cordova.geolocation':'cordova-plugin-geolocation',
+    'org.apache.cordova.globalization':'cordova-plugin-globalization',
+    'org.apache.cordova.inappbrowser':'cordova-plugin-inappbrowser',
+    'org.apache.cordova.media':'cordova-plugin-media',
+    'org.apache.cordova.media-capture':'cordova-plugin-media-capture',
+    'org.apache.cordova.network-information':'cordova-plugin-network-information',
+    'org.apache.cordova.splashscreen':'cordova-plugin-splashscreen',
+    'org.apache.cordova.statusbar':'cordova-plugin-statusbar',
+    'org.apache.cordova.vibration':'cordova-plugin-vibration',
+    'org.apache.cordova.test-framework':'cordova-plugin-test-framework',
+    'com.msopentech.websql' : 'cordova-plugin-websql',
+    'com.msopentech.indexeddb' : 'cordova-plugin-indexeddb',
+    'com.microsoft.aad.adal' : 'cordova-plugin-ms-adal',
+    'com.microsoft.capptain' : 'capptain-cordova',
+    'com.microsoft.services.aadgraph' : 'cordova-plugin-ms-aad-graph',
+    'com.microsoft.services.files' : 'cordova-plugin-ms-files',
+    'om.microsoft.services.outlook' : 'cordova-plugin-ms-outlook',
+    'com.pbakondy.sim' : 'cordova-plugin-sim',
+    'android.support.v4' : 'cordova-plugin-android-support-v4',
+    'android.support.v7-appcompat' : 'cordova-plugin-android-support-v7-appcompat',
+    'com.google.playservices' : 'cordova-plugin-googleplayservices',
+    'com.google.cordova.admob' : 'cordova-plugin-admobpro',
+    'com.rjfun.cordova.extension' : 'cordova-plugin-extension',
+    'com.rjfun.cordova.plugin.admob' : 'cordova-plugin-admob',
+    'com.rjfun.cordova.flurryads' : 'cordova-plugin-flurry',
+    'com.rjfun.cordova.facebookads' : 'cordova-plugin-facebookads',
+    'com.rjfun.cordova.httpd' : 'cordova-plugin-httpd',
+    'com.rjfun.cordova.iad' : 'cordova-plugin-iad',
+    'com.rjfun.cordova.iflyspeech' : 'cordova-plugin-iflyspeech',
+    'com.rjfun.cordova.lianlianpay' : 'cordova-plugin-lianlianpay',
+    'com.rjfun.cordova.mobfox' : 'cordova-plugin-mobfox',
+    'com.rjfun.cordova.mopub' : 'cordova-plugin-mopub',
+    'com.rjfun.cordova.mmedia' : 'cordova-plugin-mmedia',
+    'com.rjfun.cordova.nativeaudio' : 'cordova-plugin-nativeaudio',
+    'com.rjfun.cordova.plugin.paypalmpl' : 'cordova-plugin-paypalmpl',
+    'com.rjfun.cordova.smartadserver' : 'cordova-plugin-smartadserver',
+    'com.rjfun.cordova.sms' : 'cordova-plugin-sms',
+    'com.rjfun.cordova.wifi' : 'cordova-plugin-wifi',
+    'com.ohh2ahh.plugins.appavailability' : 'cordova-plugin-appavailability',
+    'org.adapt-it.cordova.fonts' : 'cordova-plugin-fonts',
+    'de.martinreinhardt.cordova.plugins.barcodeScanner' : 'cordova-plugin-barcodescanner',
+    'de.martinreinhardt.cordova.plugins.urlhandler' : 'cordova-plugin-urlhandler',
+    'de.martinreinhardt.cordova.plugins.email' : 'cordova-plugin-email',
+    'de.martinreinhardt.cordova.plugins.certificates' : 'cordova-plugin-certificates',
+    'de.martinreinhardt.cordova.plugins.sqlite' : 'cordova-plugin-sqlite',
+    'fr.smile.cordova.fileopener' : 'cordova-plugin-fileopener',
+    'org.smile.websqldatabase.initializer' : 'cordova-plugin-websqldatabase-initializer',
+    'org.smile.websqldatabase.wpdb' : 'cordova-plugin-websqldatabase',
+    'org.jboss.aerogear.cordova.push' : 'aerogear-cordova-push',
+    'org.jboss.aerogear.cordova.oauth2' : 'aerogear-cordova-oauth2',
+    'org.jboss.aerogear.cordova.geo' : 'aerogear-cordova-geo',
+    'org.jboss.aerogear.cordova.crypto' : 'aerogear-cordova-crypto',
+    'org.jboss.aerogaer.cordova.otp' : 'aerogear-cordova-otp',
+    'uk.co.ilee.applewatch' : 'cordova-plugin-apple-watch',
+    'uk.co.ilee.directions' : 'cordova-plugin-directions',
+    'uk.co.ilee.gamecenter' : 'cordova-plugin-game-center',
+    'uk.co.ilee.jailbreakdetection' : 'cordova-plugin-jailbreak-detection',
+    'uk.co.ilee.nativetransitions' : 'cordova-plugin-native-transitions',
+    'uk.co.ilee.pedometer' : 'cordova-plugin-pedometer',
+    'uk.co.ilee.shake' : 'cordova-plugin-shake',
+    'uk.co.ilee.touchid' : 'cordova-plugin-touchid',
+    'com.knowledgecode.cordova.websocket' : 'cordova-plugin-websocket',
+    'com.elixel.plugins.settings' : 'cordova-plugin-settings',
+    'com.cowbell.cordova.geofence' : 'cordova-plugin-geofence',
+    'com.blackberry.community.preventsleep' : 'cordova-plugin-preventsleep',
+    'com.blackberry.community.gamepad' : 'cordova-plugin-gamepad',
+    'com.blackberry.community.led' : 'cordova-plugin-led',
+    'com.blackberry.community.thumbnail' : 'cordova-plugin-thumbnail',
+    'com.blackberry.community.mediakeys' : 'cordova-plugin-mediakeys',
+    'com.blackberry.community.simplebtlehrplugin' : 'cordova-plugin-bluetoothheartmonitor',
+    'com.blackberry.community.simplebeaconplugin' : 'cordova-plugin-bluetoothibeacon',
+    'com.blackberry.community.simplebtsppplugin' : 'cordova-plugin-bluetoothspp',
+    'com.blackberry.community.clipboard' : 'cordova-plugin-clipboard',
+    'com.blackberry.community.curl' : 'cordova-plugin-curl',
+    'com.blackberry.community.qt' : 'cordova-plugin-qtbridge',
+    'com.blackberry.community.upnp' : 'cordova-plugin-upnp',
+    'com.blackberry.community.PasswordCrypto' : 'cordova-plugin-password-crypto',
+    'com.blackberry.community.deviceinfoplugin' : 'cordova-plugin-deviceinfo',
+    'com.blackberry.community.gsecrypto' : 'cordova-plugin-bb-crypto',
+    'com.blackberry.community.mongoose' : 'cordova-plugin-mongoose',
+    'com.blackberry.community.sysdialog' : 'cordova-plugin-bb-sysdialog',
+    'com.blackberry.community.screendisplay' : 'cordova-plugin-screendisplay',
+    'com.blackberry.community.messageplugin' : 'cordova-plugin-bb-messageretrieve',
+    'com.blackberry.community.emailsenderplugin' : 'cordova-plugin-emailsender',
+    'com.blackberry.community.audiometadata' : 'cordova-plugin-audiometadata',
+    'com.blackberry.community.deviceemails' : 'cordova-plugin-deviceemails',
+    'com.blackberry.community.audiorecorder' : 'cordova-plugin-audiorecorder',
+    'com.blackberry.community.vibration' : 'cordova-plugin-vibrate-intense',
+    'com.blackberry.community.SMSPlugin' : 'cordova-plugin-bb-sms',
+    'com.blackberry.community.extractZipFile' : 'cordova-plugin-bb-zip',
+    'com.blackberry.community.lowlatencyaudio' : 'cordova-plugin-bb-nativeaudio',
+    'com.blackberry.community.barcodescanner' : 'phonegap-plugin-barcodescanner',
+    'com.blackberry.app' : 'cordova-plugin-bb-app',
+    'com.blackberry.bbm.platform' : 'cordova-plugin-bbm',
+    'com.blackberry.connection' : 'cordova-plugin-bb-connection',
+    'com.blackberry.identity' : 'cordova-plugin-bb-identity',
+    'com.blackberry.invoke.card' : 'cordova-plugin-bb-card',
+    'com.blackberry.invoke' : 'cordova-plugin-bb-invoke',
+    'com.blackberry.invoked' : 'cordova-plugin-bb-invoked',
+    'com.blackberry.io.filetransfer' : 'cordova-plugin-bb-filetransfer',
+    'com.blackberry.io' : 'cordova-plugin-bb-io',
+    'com.blackberry.notification' : 'cordova-plugin-bb-notification',
+    'com.blackberry.payment' : 'cordova-plugin-bb-payment',
+    'com.blackberry.pim.calendar' : 'cordova-plugin-bb-calendar',
+    'com.blackberry.pim.contacts' : 'cordova-plugin-bb-contacts',
+    'com.blackberry.pim.lib' : 'cordova-plugin-bb-pimlib',
+    'com.blackberry.push' : 'cordova-plugin-bb-push',
+    'com.blackberry.screenshot' : 'cordova-plugin-screenshot',
+    'com.blackberry.sensors' : 'cordova-plugin-bb-sensors',
+    'com.blackberry.system' : 'cordova-plugin-bb-system',
+    'com.blackberry.ui.contextmenu' : 'cordova-plugin-bb-ctxmenu',
+    'com.blackberry.ui.cover' : 'cordova-plugin-bb-cover',
+    'com.blackberry.ui.dialog' : 'cordova-plugin-bb-dialog',
+    'com.blackberry.ui.input' : 'cordova-plugin-touch-keyboard',
+    'com.blackberry.ui.toast' : 'cordova-plugin-toast',
+    'com.blackberry.user.identity' : 'cordova-plugin-bb-idservice',
+    'com.blackberry.utils' : 'cordova-plugin-bb-utils',
+    'net.yoik.cordova.plugins.screenorientation' : 'cordova-plugin-screen-orientation',
+    'com.phonegap.plugins.barcodescanner' : 'phonegap-plugin-barcodescanner',
+    'com.manifoldjs.hostedwebapp' : 'cordova-plugin-hostedwebapp',
+    'com.initialxy.cordova.themeablebrowser' : 'cordova-plugin-themeablebrowser',
+    'gr.denton.photosphere' : 'cordova-plugin-panoramaviewer',
+    'nl.x-services.plugins.actionsheet' : 'cordova-plugin-actionsheet',
+    'nl.x-services.plugins.socialsharing' : 'cordova-plugin-x-socialsharing',
+    'nl.x-services.plugins.googleplus' : 'cordova-plugin-googleplus',
+    'nl.x-services.plugins.insomnia' : 'cordova-plugin-insomnia',
+    'nl.x-services.plugins.toast' : 'cordova-plugin-x-toast',
+    'nl.x-services.plugins.calendar' : 'cordova-plugin-calendar',
+    'nl.x-services.plugins.launchmyapp' : 'cordova-plugin-customurlscheme',
+    'nl.x-services.plugins.flashlight' : 'cordova-plugin-flashlight',
+    'nl.x-services.plugins.sslcertificatechecker' : 'cordova-plugin-sslcertificatechecker',
+    'com.bridge.open' : 'cordova-open',
+    'com.bridge.safe' : 'cordova-safe',
+    'com.disusered.open' : 'cordova-open',
+    'com.disusered.safe' : 'cordova-safe',
+    'me.apla.cordova.app-preferences' : 'cordova-plugin-app-preferences',
+    'com.konotor.cordova' : 'cordova-plugin-konotor',
+    'io.intercom.cordova' : 'cordova-plugin-intercom',
+    'com.onesignal.plugins.onesignal' : 'onesignal-cordova-plugin',
+    'com.danjarvis.document-contract': 'cordova-plugin-document-contract',
+    'com.eface2face.iosrtc' : 'cordova-plugin-iosrtc',
+    'com.mobileapptracking.matplugin' : 'cordova-plugin-tune',
+    'com.marianhello.cordova.background-geolocation' : 'cordova-plugin-mauron85-background-geolocation',
+    'fr.louisbl.cordova.locationservices' : 'cordova-plugin-locationservices',
+    'fr.louisbl.cordova.gpslocation' : 'cordova-plugin-gpslocation',
+    'com.hiliaox.weibo' : 'cordova-plugin-weibo',
+    'com.uxcam.cordova.plugin' : 'cordova-uxcam',
+    'de.fastr.phonegap.plugins.downloader' : 'cordova-plugin-fastrde-downloader',
+    'de.fastr.phonegap.plugins.injectView' : 'cordova-plugin-fastrde-injectview',
+    'de.fastr.phonegap.plugins.CheckGPS' : 'cordova-plugin-fastrde-checkgps',
+    'de.fastr.phonegap.plugins.md5chksum' : 'cordova-plugin-fastrde-md5',
+    'io.repro.cordova' : 'cordova-plugin-repro',
+    're.notifica.cordova': 'cordova-plugin-notificare-push',
+    'com.megster.cordova.ble': 'cordova-plugin-ble-central',
+    'com.megster.cordova.bluetoothserial': 'cordova-plugin-bluetooth-serial',
+    'com.megster.cordova.rfduino': 'cordova-plugin-rfduino',
+    'cz.velda.cordova.plugin.devicefeedback': 'cordova-plugin-velda-devicefeedback',
+    'cz.Velda.cordova.plugin.devicefeedback': 'cordova-plugin-velda-devicefeedback',
+    'org.scriptotek.appinfo': 'cordova-plugin-appinfo',
+    'com.yezhiming.cordova.appinfo': 'cordova-plugin-appinfo',
+    'pl.makingwaves.estimotebeacons': 'cordova-plugin-estimote',
+    'com.evothings.ble': 'cordova-plugin-ble',
+    'com.appsee.plugin' : 'cordova-plugin-appsee',
+    'am.armsoft.plugins.listpicker': 'cordova-plugin-listpicker',
+    'com.pushbots.push': 'pushbots-cordova-plugin',
+    'com.admob.google': 'cordova-admob',
+    'admob.ads.google': 'cordova-admob-ads',
+    'admob.google.plugin': 'admob-google',
+    'com.admob.admobads': 'admob-ads',
+    'com.connectivity.monitor': 'cordova-connectivity-monitor',
+    'com.ios.libgoogleadmobads': 'cordova-libgoogleadmobads',
+    'com.google.play.services': 'cordova-google-play-services',
+    'android.support.v13': 'cordova-android-support-v13',
+    'android.support.v4': 'cordova-android-support-v4', // Duplicated key ;)
+    'com.analytics.google': 'cordova-plugin-analytics',
+    'com.analytics.adid.google': 'cordova-plugin-analytics-adid',
+    'com.chariotsolutions.nfc.plugin': 'phonegap-nfc',
+    'com.samz.mixpanel': 'cordova-plugin-mixpanel',
+    'de.appplant.cordova.common.RegisterUserNotificationSettings': 'cordova-plugin-registerusernotificationsettings',
+    'plugin.google.maps': 'cordova-plugin-googlemaps',
+    'xu.li.cordova.wechat': 'cordova-plugin-wechat',
+    'es.keensoft.fullscreenimage': 'cordova-plugin-fullscreenimage',
+    'com.arcoirislabs.plugin.mqtt' : 'cordova-plugin-mqtt'
+};
+
+module.exports.oldToNew = map;
+
+var reverseMap = {};
+Object.keys(map).forEach(function(elem){
+    reverseMap[map[elem]] = elem;
+});
+
+module.exports.newToOld = reverseMap;

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/f0e19e8c/cordova-lib/spec-plugman/projects/android/cordova/node_modules/cordova-registry-mapper/package.json
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android/cordova/node_modules/cordova-registry-mapper/package.json b/cordova-lib/spec-plugman/projects/android/cordova/node_modules/cordova-registry-mapper/package.json
new file mode 100644
index 0000000..d1b990b
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/android/cordova/node_modules/cordova-registry-mapper/package.json
@@ -0,0 +1,85 @@
+{
+  "_args": [
+    [
+      {
+        "raw": "cordova-registry-mapper@^1.1.8",
+        "scope": null,
+        "escapedName": "cordova-registry-mapper",
+        "name": "cordova-registry-mapper",
+        "rawSpec": "^1.1.8",
+        "spec": ">=1.1.8 <2.0.0",
+        "type": "range"
+      },
+      "/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common"
+    ]
+  ],
+  "_from": "cordova-registry-mapper@>=1.1.8 <2.0.0",
+  "_id": "cordova-registry-mapper@1.1.15",
+  "_inCache": true,
+  "_location": "/cordova-android/cordova-registry-mapper",
+  "_nodeVersion": "5.4.1",
+  "_npmUser": {
+    "name": "stevegill",
+    "email": "stevengill97@gmail.com"
+  },
+  "_npmVersion": "3.5.3",
+  "_phantomChildren": {},
+  "_requested": {
+    "raw": "cordova-registry-mapper@^1.1.8",
+    "scope": null,
+    "escapedName": "cordova-registry-mapper",
+    "name": "cordova-registry-mapper",
+    "rawSpec": "^1.1.8",
+    "spec": ">=1.1.8 <2.0.0",
+    "type": "range"
+  },
+  "_requiredBy": [
+    "/cordova-android/cordova-common"
+  ],
+  "_resolved": "http://registry.npmjs.org/cordova-registry-mapper/-/cordova-registry-mapper-1.1.15.tgz",
+  "_shasum": "e244b9185b8175473bff6079324905115f83dc7c",
+  "_shrinkwrap": null,
+  "_spec": "cordova-registry-mapper@^1.1.8",
+  "_where": "/Users/steveng/repo/cordova/cordova-android/node_modules/cordova-common",
+  "author": {
+    "name": "Steve Gill"
+  },
+  "bugs": {
+    "url": "https://github.com/stevengill/cordova-registry-mapper/issues"
+  },
+  "dependencies": {},
+  "description": "Maps old plugin ids to new plugin names for fetching from npm",
+  "devDependencies": {
+    "tape": "^3.5.0"
+  },
+  "directories": {},
+  "dist": {
+    "shasum": "e244b9185b8175473bff6079324905115f83dc7c",
+    "tarball": "https://registry.npmjs.org/cordova-registry-mapper/-/cordova-registry-mapper-1.1.15.tgz"
+  },
+  "gitHead": "00af0f028ec94154a364eeabe38b8e22320647bd",
+  "homepage": "https://github.com/stevengill/cordova-registry-mapper#readme",
+  "keywords": [
+    "cordova",
+    "plugins"
+  ],
+  "license": "Apache version 2.0",
+  "main": "index.js",
+  "maintainers": [
+    {
+      "name": "stevegill",
+      "email": "stevengill97@gmail.com"
+    }
+  ],
+  "name": "cordova-registry-mapper",
+  "optionalDependencies": {},
+  "readme": "ERROR: No README data found!",
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/stevengill/cordova-registry-mapper.git"
+  },
+  "scripts": {
+    "test": "node tests/test.js"
+  },
+  "version": "1.1.15"
+}

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/f0e19e8c/cordova-lib/spec-plugman/projects/android/cordova/node_modules/cordova-registry-mapper/tests/test.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android/cordova/node_modules/cordova-registry-mapper/tests/test.js b/cordova-lib/spec-plugman/projects/android/cordova/node_modules/cordova-registry-mapper/tests/test.js
new file mode 100644
index 0000000..35343be
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/android/cordova/node_modules/cordova-registry-mapper/tests/test.js
@@ -0,0 +1,11 @@
+var test = require('tape');
+var oldToNew = require('../index').oldToNew;
+var newToOld = require('../index').newToOld;
+
+test('plugin mappings exist', function(t) {
+    t.plan(2);
+
+    t.equal('cordova-plugin-device', oldToNew['org.apache.cordova.device']);
+
+    t.equal('org.apache.cordova.device', newToOld['cordova-plugin-device']);
+})

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/f0e19e8c/cordova-lib/spec-plugman/projects/android/cordova/node_modules/elementtree/.npmignore
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android/cordova/node_modules/elementtree/.npmignore b/cordova-lib/spec-plugman/projects/android/cordova/node_modules/elementtree/.npmignore
new file mode 100644
index 0000000..3c3629e
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/android/cordova/node_modules/elementtree/.npmignore
@@ -0,0 +1 @@
+node_modules

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/f0e19e8c/cordova-lib/spec-plugman/projects/android/cordova/node_modules/elementtree/.travis.yml
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android/cordova/node_modules/elementtree/.travis.yml b/cordova-lib/spec-plugman/projects/android/cordova/node_modules/elementtree/.travis.yml
new file mode 100644
index 0000000..6f27c96
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/android/cordova/node_modules/elementtree/.travis.yml
@@ -0,0 +1,10 @@
+language: node_js
+
+node_js:
+  - 0.6
+
+script: make test
+
+notifications:
+  email:
+    - tomaz+travisci@tomaz.me

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/f0e19e8c/cordova-lib/spec-plugman/projects/android/cordova/node_modules/elementtree/CHANGES.md
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android/cordova/node_modules/elementtree/CHANGES.md b/cordova-lib/spec-plugman/projects/android/cordova/node_modules/elementtree/CHANGES.md
new file mode 100644
index 0000000..50d415d
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/android/cordova/node_modules/elementtree/CHANGES.md
@@ -0,0 +1,39 @@
+elementtree v0.1.6 (in development)
+
+* Add support for CData elements. (#14)
+  [hermannpencole]
+
+elementtree v0.1.5 - 2012-11-14
+
+* Fix a bug in the find() and findtext() method which could manifest itself
+  under some conditions.
+  [metagriffin]
+
+elementtree v0.1.4 - 2012-10-15
+
+* Allow user to use namespaced attributes when using find* functions.
+  [Andrew Lunny]
+
+elementtree v0.1.3 - 2012-09-21
+
+* Improve the output of text content in the tags (strip unnecessary line break
+  characters).
+
+[Darryl Pogue]
+
+elementtree v0.1.2 - 2012-09-04
+
+ * Allow user to pass 'indent' option to ElementTree.write method. If this
+   option is specified (e.g. {'indent': 4}). XML will be pretty printed.
+   [Darryl Pogue, Tomaz Muraus]
+
+ * Bump sax dependency version.
+
+elementtree v0.1.1 - 2011-09-23
+
+ * Improve special character escaping.
+   [Ryan Phillips]
+
+elementtree v0.1.0 - 2011-09-05
+
+ * Initial release.

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/f0e19e8c/cordova-lib/spec-plugman/projects/android/cordova/node_modules/elementtree/LICENSE.txt
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android/cordova/node_modules/elementtree/LICENSE.txt b/cordova-lib/spec-plugman/projects/android/cordova/node_modules/elementtree/LICENSE.txt
new file mode 100644
index 0000000..6b0b127
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/android/cordova/node_modules/elementtree/LICENSE.txt
@@ -0,0 +1,203 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/f0e19e8c/cordova-lib/spec-plugman/projects/android/cordova/node_modules/elementtree/Makefile
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android/cordova/node_modules/elementtree/Makefile b/cordova-lib/spec-plugman/projects/android/cordova/node_modules/elementtree/Makefile
new file mode 100755
index 0000000..ab7c4e0
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/android/cordova/node_modules/elementtree/Makefile
@@ -0,0 +1,21 @@
+TESTS := \
+	tests/test-simple.js
+
+
+
+PATH := ./node_modules/.bin:$(PATH)
+
+WHISKEY := $(shell bash -c 'PATH=$(PATH) type -p whiskey')
+
+default: test
+
+test:
+	NODE_PATH=`pwd`/lib/ ${WHISKEY} --scope-leaks --sequential --real-time --tests "${TESTS}"
+
+tap:
+	NODE_PATH=`pwd`/lib/ ${WHISKEY} --test-reporter tap --sequential --real-time --tests "${TESTS}"
+
+coverage:
+	NODE_PATH=`pwd`/lib/ ${WHISKEY} --sequential --coverage  --coverage-reporter html --coverage-dir coverage_html --tests "${TESTS}"
+
+.PHONY: default test coverage tap scope

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/f0e19e8c/cordova-lib/spec-plugman/projects/android/cordova/node_modules/elementtree/NOTICE
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android/cordova/node_modules/elementtree/NOTICE b/cordova-lib/spec-plugman/projects/android/cordova/node_modules/elementtree/NOTICE
new file mode 100644
index 0000000..28ad70a
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/android/cordova/node_modules/elementtree/NOTICE
@@ -0,0 +1,5 @@
+node-elementtree
+Copyright (c) 2011, Rackspace, Inc.
+
+The ElementTree toolkit is Copyright (c) 1999-2007 by Fredrik Lundh
+

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/f0e19e8c/cordova-lib/spec-plugman/projects/android/cordova/node_modules/elementtree/README.md
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android/cordova/node_modules/elementtree/README.md b/cordova-lib/spec-plugman/projects/android/cordova/node_modules/elementtree/README.md
new file mode 100644
index 0000000..738420c
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/android/cordova/node_modules/elementtree/README.md
@@ -0,0 +1,141 @@
+node-elementtree
+====================
+
+node-elementtree is a [Node.js](http://nodejs.org) XML parser and serializer based upon the [Python ElementTree v1.3](http://effbot.org/zone/element-index.htm) module.
+
+Installation
+====================
+
+    $ npm install elementtree
+    
+Using the library
+====================
+
+For the usage refer to the Python ElementTree library documentation - [http://effbot.org/zone/element-index.htm#usage](http://effbot.org/zone/element-index.htm#usage).
+
+Supported XPath expressions in `find`, `findall` and `findtext` methods are listed on [http://effbot.org/zone/element-xpath.htm](http://effbot.org/zone/element-xpath.htm).
+
+Example 1 \u2013 Creating An XML Document
+====================
+
+This example shows how to build a valid XML document that can be published to
+Atom Hopper. Atom Hopper is used internally as a bridge from products all the
+way to collecting revenue, called \u201cUsage.\u201d  MaaS and other products send similar
+events to it every time user performs an action on a resource
+(e.g. creates,updates or deletes). Below is an example of leveraging the API
+to create a new XML document.
+
+```javascript
+var et = require('elementtree');
+var XML = et.XML;
+var ElementTree = et.ElementTree;
+var element = et.Element;
+var subElement = et.SubElement;
+
+var date, root, tenantId, serviceName, eventType, usageId, dataCenter, region,
+checks, resourceId, category, startTime, resourceName, etree, xml;
+
+date = new Date();
+
+root = element('entry');
+root.set('xmlns', 'http://www.w3.org/2005/Atom');
+
+tenantId = subElement(root, 'TenantId');
+tenantId.text = '12345';
+
+serviceName = subElement(root, 'ServiceName');
+serviceName.text = 'MaaS';
+
+resourceId = subElement(root, 'ResourceID');
+resourceId.text = 'enAAAA';
+
+usageId = subElement(root, 'UsageID');
+usageId.text = '550e8400-e29b-41d4-a716-446655440000';
+
+eventType = subElement(root, 'EventType');
+eventType.text = 'create';
+
+category = subElement(root, 'category');
+category.set('term', 'monitoring.entity.create');
+
+dataCenter = subElement(root, 'DataCenter');
+dataCenter.text = 'global';
+
+region = subElement(root, 'Region');
+region.text = 'global';
+
+startTime = subElement(root, 'StartTime');
+startTime.text = date;
+
+resourceName = subElement(root, 'ResourceName');
+resourceName.text = 'entity';
+
+etree = new ElementTree(root);
+xml = etree.write({'xml_declaration': false});
+console.log(xml);
+```
+
+As you can see, both et.Element and et.SubElement are factory methods which
+return a new instance of Element and SubElement class, respectively.
+When you create a new element (tag) you can use set method to set an attribute.
+To set the tag value, assign a value to the .text attribute.
+
+This example would output a document that looks like this:
+
+```xml
+<entry xmlns="http://www.w3.org/2005/Atom">
+  <TenantId>12345</TenantId>
+  <ServiceName>MaaS</ServiceName>
+  <ResourceID>enAAAA</ResourceID>
+  <UsageID>550e8400-e29b-41d4-a716-446655440000</UsageID>
+  <EventType>create</EventType>
+  <category term="monitoring.entity.create"/>
+  <DataCenter>global</DataCenter>
+  <Region>global</Region>
+  <StartTime>Sun Apr 29 2012 16:37:32 GMT-0700 (PDT)</StartTime>
+  <ResourceName>entity</ResourceName>
+</entry>
+```
+
+Example 2 \u2013 Parsing An XML Document
+====================
+
+This example shows how to parse an XML document and use simple XPath selectors.
+For demonstration purposes, we will use the XML document located at
+https://gist.github.com/2554343.
+
+Behind the scenes, node-elementtree uses Isaac\u2019s sax library for parsing XML,
+but the library has a concept of \u201cparsers,\u201d which means it\u2019s pretty simple to
+add support for a different parser.
+
+```javascript
+var fs = require('fs');
+
+var et = require('elementtree');
+
+var XML = et.XML;
+var ElementTree = et.ElementTree;
+var element = et.Element;
+var subElement = et.SubElement;
+
+var data, etree;
+
+data = fs.readFileSync('document.xml').toString();
+etree = et.parse(data);
+
+console.log(etree.findall('./entry/TenantId').length); // 2
+console.log(etree.findtext('./entry/ServiceName')); // MaaS
+console.log(etree.findall('./entry/category')[0].get('term')); // monitoring.entity.create
+console.log(etree.findall('*/category/[@term="monitoring.entity.update"]').length); // 1
+```
+
+Build status
+====================
+
+[![Build Status](https://secure.travis-ci.org/racker/node-elementtree.png)](http://travis-ci.org/racker/node-elementtree)
+
+
+License
+====================
+
+node-elementtree is distributed under the [Apache license](http://www.apache.org/licenses/LICENSE-2.0.html).

http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/f0e19e8c/cordova-lib/spec-plugman/projects/android/cordova/node_modules/elementtree/lib/constants.js
----------------------------------------------------------------------
diff --git a/cordova-lib/spec-plugman/projects/android/cordova/node_modules/elementtree/lib/constants.js b/cordova-lib/spec-plugman/projects/android/cordova/node_modules/elementtree/lib/constants.js
new file mode 100644
index 0000000..b057faf
--- /dev/null
+++ b/cordova-lib/spec-plugman/projects/android/cordova/node_modules/elementtree/lib/constants.js
@@ -0,0 +1,20 @@
+/*
+ *  Copyright 2011 Rackspace
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+var DEFAULT_PARSER = 'sax';
+
+exports.DEFAULT_PARSER = DEFAULT_PARSER;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org