You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by fi...@apache.org on 2013/05/24 01:41:48 UTC

[27/38] updated android, ios, bb libraries to 2.8.x branch. fixed a few assertions with project changes. removed blackberry support until create script can be finalized.

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/88ad654c/lib/cordova-blackberry/bin/templates/project/cordova/lib/run
----------------------------------------------------------------------
diff --git a/lib/cordova-blackberry/bin/templates/project/cordova/lib/run b/lib/cordova-blackberry/bin/templates/project/cordova/lib/run
new file mode 100755
index 0000000..d6b4b9c
--- /dev/null
+++ b/lib/cordova-blackberry/bin/templates/project/cordova/lib/run
@@ -0,0 +1,204 @@
+#!/usr/bin/env node
+
+/*
+ *  Copyright 2012 Research In Motion Limited.
+ *
+ * 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 childProcess = require("child_process"),
+    fs = require("fs"),
+    path = require("path"),
+    util = require("util"),
+    wrench = require("wrench"),
+    conf = require("./conf"),
+    localize = require("./localize"),
+    pkgrUtils = require("./packager-utils"),
+    properties = require('../../project.json'),
+    program = require('commander'),
+    xml2js = require('xml2js'),
+    target,
+    ip,
+    password,
+    workingdir,
+    barPath;
+
+function generateOptions(uninstall) {
+    var options = [];
+
+    workingdir = path.normalize(__dirname + "/.."),
+    barPath = path.normalize(__dirname + "/../../build/" + properties.targets[target].type + "/" + properties.barName + ".bar");
+
+    options.push("-device");
+    options.push(ip);
+
+    if (password) {
+        options.push("-password");
+        options.push(password);
+    }
+
+    options.push("-package");
+    options.push(barPath);
+
+    if (uninstall) {
+        options.push("-uninstallApp");
+        return options;
+    } else {
+
+        options.push("-installApp");
+
+        if (program.launch) {
+            options.push("-launchApp");
+        }
+
+        return options;
+    }
+}
+
+function execNativeDeploy(optionsArray, callback) {
+    var script = "/bin/blackberry-deploy",
+        nativeDeploy;
+        options = optionsArray.join(" ");
+
+    if (pkgrUtils.isWindows()) {
+        script += ".bat";
+    }
+
+    if (fs.existsSync(conf.DEPENDENCIES_TOOLS)) {
+        nativeDeploy = childProcess.exec(path.normalize(conf.DEPENDENCIES_TOOLS + script +" "+ options), {
+            "cwd": workingdir,
+            "env": process.env
+        });
+
+        nativeDeploy.stdout.on("data", pkgrUtils.handleProcessOutput);
+
+        nativeDeploy.stderr.on("data", pkgrUtils.handleProcessOutput);
+
+        nativeDeploy.on("exit", function (code) {
+            if (callback && typeof callback === "function") {
+                callback(code);
+            }
+        });
+    } else {
+        throw localize.translate("EXCEPTION_MISSING_TOOLS");
+    }
+}
+
+function checkTarget() {
+    if (!target) {
+        console.log("No target exists, to add that target please run target add <name> <ip> [-t | --type <device | simulator>] [-p <password>] [--pin <devicepin>]\n");
+        return false;
+    }
+    if (!properties.targets[target]) {
+        console.log("The target \""+target+"\" does not exist, to add that target please run target add "+target+" <ip> [-t | --type <device | simulator>] [-p <password>] [--pin <devicepin>]\n");
+        return false;
+    }
+    if (properties.targets[target].ip) {
+       ip = properties.targets[target].ip; 
+    } else {
+        console.log("IP is not defined in target \""+target+"\"\n");
+        return false;
+    }
+    if (properties.targets[target].password) {
+       password = properties.targets[target].password;
+    } 
+    return true;
+
+}
+
+function deployAll(keys) {
+    target = keys[0];
+
+    if (target) {
+        if (checkTarget()) {
+            var options = generateOptions();
+            if (program.uninstall) {
+                uninstall(
+                    function() {
+                        keys.shift();
+                        deployAll(keys);
+                });
+            } else {
+                execNativeDeploy(options,
+                    function() {
+                        deployAll(keys);
+                });
+            }
+        }
+    }
+}
+
+function uninstall(callback) {
+    var script = "/bin/blackberry-deploy",
+        nativeDeploy;
+
+    if (pkgrUtils.isWindows()) {
+        script += ".bat";
+    }
+
+    if (fs.existsSync(conf.DEPENDENCIES_TOOLS)) {
+        nativeDeploy = childProcess.exec(path.normalize(conf.DEPENDENCIES_TOOLS + script +" -listInstalledApps -device " +ip+ " -password " +password), {
+            "cwd": workingdir,
+            "env": process.env
+        }, function (error, stdout, stderr) {
+            var parser = new xml2js.Parser();
+            fs.readFile(path.join(__dirname + "/../../www/", "config.xml"), function(err, data) {
+                parser.parseString(data, function (err, result) {
+                    if (stdout.indexOf(result['@'].id) != -1) {
+                        var options = generateOptions(true);
+                        execNativeDeploy(options,
+                            function(){
+                                options = generateOptions(false);
+                                execNativeDeploy(options, callback);
+                        });
+                    } else {
+                        options = generateOptions(false);
+                        execNativeDeploy(options, callback);
+                    }
+                });
+            });
+        });
+    }
+}
+
+function exec(callback) {
+    program
+        .usage('command [<target>] [--no-launch] [--no-uninstall]')
+        .option('--no-uninstall', 'does not uninstall app from device')
+        .option('--no-launch', 'do not launch the app on device')
+
+    program
+        .command('all')
+        .usage('all [--no-launch] [--no-uninstall]')
+        .description('    Deploy the app on all targets')
+        .option('--no-uninstall', 'does not uninstall app from device')
+        .option('--no-launch', 'do not launch the app on device')
+    
+    program.parse(process.argv);
+    target = program.args[0] ? program.args[0] : properties.defaultTarget
+
+    if (target === "all") {
+        deployAll(Object.keys(properties.targets));
+    } else {
+        if (checkTarget()) {
+            if (program.uninstall) {
+                uninstall(callback);
+            } else {
+                options = generateOptions(false);
+                execNativeDeploy(options, callback)
+            }
+        }
+    }
+}
+
+exec(null);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/88ad654c/lib/cordova-blackberry/bin/templates/project/cordova/lib/session.js
----------------------------------------------------------------------
diff --git a/lib/cordova-blackberry/bin/templates/project/cordova/lib/session.js b/lib/cordova-blackberry/bin/templates/project/cordova/lib/session.js
new file mode 100644
index 0000000..bb9fa06
--- /dev/null
+++ b/lib/cordova-blackberry/bin/templates/project/cordova/lib/session.js
@@ -0,0 +1,120 @@
+/*
+ *  Copyright 2012 Research In Motion Limited.
+ *
+ * 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 path = require("path"),
+    fs = require("fs"),
+    wrench = require("wrench"),
+    logger = require("./logger"),
+    signingHelper = require("./signing-helper"),
+    barConf = require("./bar-conf"),
+    localize = require("./localize"),
+    params;
+
+function getParams(cmdline, toolName) {
+    if (cmdline.params) {
+        if (!params) {
+            var paramsPath = path.resolve(cmdline.params);
+
+            if (fs.existsSync(paramsPath)) {
+                try {
+                    params = require(paramsPath);
+                } catch (e) {
+                    throw localize.translate("EXCEPTION_PARAMS_FILE_ERROR", paramsPath);
+                }
+            } else {
+                throw localize.translate("EXCEPTION_PARAMS_FILE_NOT_FOUND", paramsPath);
+            }
+        }
+
+        if (params) {
+            return params[toolName];
+        }
+    }
+
+    return null;
+}
+
+
+module.exports = {
+    initialize: function (cmdline) {
+        var sourceDir,
+            signingPassword,
+            outputDir = cmdline.output,
+            properties = require("../../project.json"),
+            archivePath = path.resolve(cmdline.args[0]),
+            archiveName = properties.barName ? properties.barName : path.basename(archivePath, '.zip'),
+            appdesc,
+            buildId = cmdline.buildId;
+
+        //If -o option was not provided, default output location is the same as .zip
+        outputDir = outputDir || path.dirname(archivePath);
+
+        //Only set signingPassword if it contains a value
+        if (cmdline.password && "string" === typeof cmdline.password) {
+            signingPassword = cmdline.password;
+        }
+
+        if (cmdline.appdesc && "string" === typeof cmdline.appdesc) {
+            appdesc = path.resolve(cmdline.appdesc);
+        }
+
+        //If -s [dir] is provided
+        if (cmdline.source && "string" === typeof cmdline.source) {
+            sourceDir = cmdline.source + "/src";
+        } else {
+            sourceDir = outputDir + "/src";
+        }
+
+        if (!fs.existsSync(sourceDir)) {
+            wrench.mkdirSyncRecursive(sourceDir, "0755");
+        }
+
+        logger.level(cmdline.loglevel || 'verbose');
+
+        return {
+            "conf": require("./conf"),
+            "keepSource": !!cmdline.source,
+            "sourceDir": path.resolve(sourceDir),
+            "sourcePaths": {
+                "ROOT": path.resolve(sourceDir),
+                "CHROME": path.normalize(path.resolve(sourceDir) + barConf.CHROME),
+                "LIB": path.normalize(path.resolve(sourceDir) + barConf.LIB),
+                "EXT": path.normalize(path.resolve(sourceDir) + barConf.EXT),
+                "UI": path.normalize(path.resolve(sourceDir) + barConf.UI),
+                "PLUGINS": path.normalize(path.resolve(sourceDir) + barConf.PLUGINS),
+                "JNEXT_PLUGINS": path.normalize(path.resolve(sourceDir) + barConf.JNEXT_PLUGINS)
+            },
+            "outputDir": path.resolve(outputDir),
+            "archivePath": archivePath,
+            "archiveName": archiveName,
+            "barPath": outputDir + "/%s/" + archiveName + ".bar",
+            "debug": !!cmdline.debug,
+            "keystore": signingHelper.getKeyStorePath(),
+            "keystoreCsk": signingHelper.getCskPath(),
+            "keystoreDb": signingHelper.getDbPath(),
+            "storepass": signingPassword,
+            "buildId": buildId,
+            "appdesc" : appdesc,
+            getParams: function (toolName) {
+                return getParams(cmdline, toolName);
+            },
+            isSigningRequired: function (config) {
+                return signingHelper.getKeyStorePath() && signingPassword && config.buildId;
+            },
+            "targets": ["simulator", "device"]
+        };
+    }
+};

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/88ad654c/lib/cordova-blackberry/bin/templates/project/cordova/lib/signing-helper.js
----------------------------------------------------------------------
diff --git a/lib/cordova-blackberry/bin/templates/project/cordova/lib/signing-helper.js b/lib/cordova-blackberry/bin/templates/project/cordova/lib/signing-helper.js
new file mode 100644
index 0000000..d0daafd
--- /dev/null
+++ b/lib/cordova-blackberry/bin/templates/project/cordova/lib/signing-helper.js
@@ -0,0 +1,127 @@
+/*
+ *  Copyright 2012 Research In Motion Limited.
+ *
+ * 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 path = require('path'),
+    fs = require("fs"),
+    os = require('os'),
+    childProcess = require("child_process"),
+    util = require("util"),
+    conf = require("./conf"),
+    pkgrUtils = require("./packager-utils"),
+    logger = require("./logger"),
+    AUTHOR_P12 = "author.p12",
+    CSK = "barsigner.csk",
+    DB = "barsigner.db",
+    _self;
+
+function getDefaultPath(file) {
+    // The default location where signing key files are stored will vary based on the OS:
+    // Windows XP: %HOMEPATH%\Local Settings\Application Data\Research In Motion
+    // Windows Vista and Windows 7: %HOMEPATH%\AppData\Local\Research In Motion
+    // Mac OS: ~/Library/Research In Motion
+    // UNIX or Linux: ~/.rim
+    var p = "";
+    if (os.type().toLowerCase().indexOf("windows") >= 0) {
+        // Try Windows XP location
+        p = process.env.HOMEDRIVE + process.env.HOMEPATH + "\\Local Settings\\Application Data\\Research In Motion\\" + file;
+        if (fs.existsSync(p)) {
+            return p;
+        }
+
+        // Try Windows Vista and Windows 7 location
+        p = process.env.HOMEDRIVE + process.env.HOMEPATH + "\\AppData\\Local\\Research In Motion\\" + file;
+        if (fs.existsSync(p)) {
+            return p;
+        }
+    } else if (os.type().toLowerCase().indexOf("darwin") >= 0) {
+        // Try Mac OS location
+        p = process.env.HOME + "/Library/Research In Motion/" + file;
+        if (fs.existsSync(p)) {
+            return p;
+        }
+    } else if (os.type().toLowerCase().indexOf("linux") >= 0) {
+        // Try Linux location
+        p = process.env.HOME + "/.rim/" + file;
+        if (fs.existsSync(p)) {
+            return p;
+        }
+    }
+}
+
+function execSigner(session, target, callback) {
+    var script = "blackberry-signer",
+        cwd = path.normalize(conf.DEPENDENCIES_TOOLS + "/bin/"),
+        signer,
+        params = session.getParams("blackberry-signer"),
+        args = [];
+
+    if (pkgrUtils.isWindows()) {
+        script += ".bat";
+    } else {
+        // add path to executable to work around issue with node
+        script = cwd + script;
+    }
+
+    args.push("-keystore");
+    args.push(session.keystore);
+    args.push("-storepass");
+    args.push(session.storepass);
+
+    if (params) {
+        Object.getOwnPropertyNames(params).forEach(function (p) {
+            args.push(p);
+
+            if (params[p]) {
+                args.push(params[p]);
+            }
+        });
+    }
+
+    args.push(path.resolve(util.format(session.barPath, target)));
+
+    signer = childProcess.spawn(script, args, {
+        "cwd": cwd,
+        "env": process.env
+    });
+
+    signer.stdout.on("data", pkgrUtils.handleProcessOutput);
+
+    signer.stderr.on("data", pkgrUtils.handleProcessOutput);
+
+    signer.on("exit", function (code) {
+        if (callback && typeof callback === "function") {
+            callback(code);
+        }
+    });
+}
+
+_self = {
+    getKeyStorePath : function () {
+        // Todo: decide where to put sigtool.p12 which is genereated and used in WebWorks SDK for Tablet OS
+        return getDefaultPath(AUTHOR_P12);
+    },
+
+    getCskPath : function () {
+        return getDefaultPath(CSK);
+    },
+
+    getDbPath : function () {
+        return getDefaultPath(DB);
+    },
+
+    execSigner: execSigner
+};
+
+module.exports = _self;

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/88ad654c/lib/cordova-blackberry/bin/templates/project/cordova/lib/target
----------------------------------------------------------------------
diff --git a/lib/cordova-blackberry/bin/templates/project/cordova/lib/target b/lib/cordova-blackberry/bin/templates/project/cordova/lib/target
new file mode 100644
index 0000000..c21e6c7
--- /dev/null
+++ b/lib/cordova-blackberry/bin/templates/project/cordova/lib/target
@@ -0,0 +1,189 @@
+#!/usr/bin/env node
+/*
+ *  Copyright 2013 Research In Motion Limited.
+ *
+ * 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 path = require('path'),
+    propertiesFile = path.resolve(path.join(__dirname, '..', '..', 'project.json')),
+    properties = require(propertiesFile),
+    fs = require('fs'),
+    commander = require('commander'),
+    command,
+    name,
+    ip,
+    type,
+    password,
+    pin,
+    pinRegex = new RegExp("[0-9A-Fa-f]{8}");
+
+function writeProjectFile(contents, file) {
+    fs.writeFile(file, contents, 'utf-8', function (err) {
+        if (err) console.log("Error updating project.json :(\n" + err);
+        process.exit();
+    });
+}
+
+function isValidIp(ip) {
+    var num,
+        result = true,
+        ipArray;
+
+    if (typeof ip !== 'string') {
+        throw "IP is required";
+    } else {
+        ipArray = ip.split('.');
+        if (ipArray.length !== 4) {
+            result = false;
+        }
+        ipArray.forEach(function (quadrant) {
+            num = Number(quadrant);
+            if (isNaN(num) || (num < 0) || (num > 255)) {
+                result = false;
+            }
+        });
+    }
+    return result;
+}
+
+function isValidType(type) {
+    var result = true;
+
+    if (typeof type !== 'string') {
+        throw "target type is required";
+    }
+    else if (!(type === 'device' || type === 'simulator')) {
+        result = false;
+    }
+    return result;
+}
+
+function isValidPin(pin) {
+    var result = true;
+    if (typeof pin !== 'undefined' && !pinRegex.test(pin)) {
+        result = false;
+    }
+    return result;
+}
+
+commander
+    .usage('[command] [params]')
+    .option('-p, --password <password>', 'Specifies password for this target')
+    .option('--pin <devicepin>', 'Specifies PIN for this device')
+    .option('-t, --type <device | simulator>', 'Specifies the target type');
+
+commander
+    .on('--help', function () {
+        console.log('   Synopsis:');
+        console.log('   $ target');
+        console.log('   $ target add <name> <ip> [-t | --type <device | simulator>] [-p | --password <password>] [--pin <devicepin>]');
+        console.log('   $ target remove <name>');
+        console.log('   $ target default [name]');
+        console.log(' ');
+    });
+
+commander
+    .command('add')
+    .description("Add specified target")
+    .action(function () {
+        if (commander.args.length === 1) {
+            throw "Target details not specified";
+        }
+        name = commander.args[0];
+        ip = commander.args[1];
+        type = commander.type ? commander.type : "device";
+        if (commander.password && typeof commander.password === 'string') {
+            password = commander.password;
+        }
+        if (commander.pin && typeof commander.pin === 'string') {
+            pin = commander.pin;
+        }
+        if (!isValidIp(ip)) {
+            throw "Invalid IP: " + ip;
+        }
+        if (!isValidType(type)) {
+            throw "Invalid target type: " + type;
+        }
+        if (!isValidPin(pin)) {
+            throw "Invalid PIN: " + pin;
+        }
+        if (properties.targets.hasOwnProperty(name)) {
+            console.log("Overwriting target: " + name);
+        }
+        properties.targets[name] = {"ip": ip, "type": type, "password": password, "pin": pin};
+    });
+
+commander
+    .command('remove')
+    .description("Remove specified target")
+    .action(function () {
+        if (commander.args.length === 1) {
+            throw 'No target specified';
+        }
+        name = commander.args[0];
+        if (!properties.targets.hasOwnProperty(name)) {
+            throw "Target: '" + name + "' not found";
+        }
+        if (name === properties.defaultTarget) {
+            console.log("Deleting default target, please set a new default target");
+            properties.defaultTarget = "";
+        }
+        delete properties.targets[name];
+    });
+
+commander
+    .command('default')
+    .description("Get or set default target")
+    .action(function () {
+        if (commander.args.length === 1) {
+            console.log(properties.defaultTarget);
+            process.exit();
+        }
+        name = commander.args[0];
+        if (properties.targets.hasOwnProperty(name)) {
+            properties.defaultTarget = name;
+        } else {
+            throw "Target '" + name + "' not found";
+        }
+    });
+
+commander
+    .command('*')
+    .action(function () {
+        throw 'Unrecognized command';
+    });
+
+
+try {
+    commander.parse(process.argv);
+
+    if (commander.args.length === 0) {
+        Object.keys(properties.targets).forEach(function (target) {
+            if (target === properties.defaultTarget) {
+                console.log('* ' + target);
+            } else {
+                console.log('  ' + target);
+            }
+        });
+        process.exit();
+    }
+    if (Object.keys(properties.targets).length === 1) {
+        properties.defaultTarget = Object.keys(properties.targets)[0];
+    }
+
+    writeProjectFile(JSON.stringify(properties, null, 4) + "\n", propertiesFile);
+} catch (e) {
+    console.log(e);
+    process.exit();
+}

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/88ad654c/lib/cordova-blackberry/bin/templates/project/cordova/plugin
----------------------------------------------------------------------
diff --git a/lib/cordova-blackberry/bin/templates/project/cordova/plugin b/lib/cordova-blackberry/bin/templates/project/cordova/plugin
new file mode 100755
index 0000000..010649b
--- /dev/null
+++ b/lib/cordova-blackberry/bin/templates/project/cordova/plugin
@@ -0,0 +1,23 @@
+#!/usr/bin/env node
+
+/**
+ * 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.
+ */
+
+require(require("path").join(__dirname, "lib", "plugin.js")).cli();
+

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/88ad654c/lib/cordova-blackberry/bin/templates/project/cordova/plugin.bat
----------------------------------------------------------------------
diff --git a/lib/cordova-blackberry/bin/templates/project/cordova/plugin.bat b/lib/cordova-blackberry/bin/templates/project/cordova/plugin.bat
new file mode 100755
index 0000000..54245e0
--- /dev/null
+++ b/lib/cordova-blackberry/bin/templates/project/cordova/plugin.bat
@@ -0,0 +1,21 @@
+@ECHO OFF
+goto comment
+       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.
+:comment
+
+@node.exe %~dp0\plugin %*

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/88ad654c/lib/cordova-blackberry/bin/templates/project/cordova/run
----------------------------------------------------------------------
diff --git a/lib/cordova-blackberry/bin/templates/project/cordova/run b/lib/cordova-blackberry/bin/templates/project/cordova/run
index 260ff24..44d3334 100755
--- a/lib/cordova-blackberry/bin/templates/project/cordova/run
+++ b/lib/cordova-blackberry/bin/templates/project/cordova/run
@@ -1,41 +1,3 @@
-#! /bin/sh
-#       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.
+#!/bin/sh
 
-ANT=$(which ant)
-
-if [ -z "$1" ]
-then
-  echo 'usage: run <platform>'
-  echo 'where <platform> can be one of "blackberry", "playbook" or "qnx"'
-  echo 'NOTE: please customize the project.properties file first before using this command!'
-  exit 0
-fi
-
-if [ "$1" == "blackberry" -o "$1" == "playbook" -o "$1" == "qnx" ]
-then
-  echo 'Do you have a BlackBerry device connected to your computer? (y/n)'
-  read DEVICE
-  if [ $DEVICE == "y" ]
-  then
-    $ANT $1 debug-device
-  else
-    $ANT $1 load-simulator
-  fi
-else
-  echo 'Platform not recognized! Please use one of "blackberry", "playbook", or "qnx" for the platform parameter.'
-fi
+node $( dirname "$0")"/lib/run" "$@"

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/88ad654c/lib/cordova-blackberry/bin/templates/project/cordova/run.bat
----------------------------------------------------------------------
diff --git a/lib/cordova-blackberry/bin/templates/project/cordova/run.bat b/lib/cordova-blackberry/bin/templates/project/cordova/run.bat
new file mode 100755
index 0000000..0f5da0a
--- /dev/null
+++ b/lib/cordova-blackberry/bin/templates/project/cordova/run.bat
@@ -0,0 +1,21 @@
+@ECHO OFF
+goto comment
+       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.
+:comment
+
+@node.exe %~dp0\lib\run %*

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/88ad654c/lib/cordova-blackberry/bin/templates/project/cordova/target
----------------------------------------------------------------------
diff --git a/lib/cordova-blackberry/bin/templates/project/cordova/target b/lib/cordova-blackberry/bin/templates/project/cordova/target
new file mode 100755
index 0000000..6a28219
--- /dev/null
+++ b/lib/cordova-blackberry/bin/templates/project/cordova/target
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+node $( dirname "$0")"/lib/target" "$@"

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/88ad654c/lib/cordova-blackberry/bin/templates/project/cordova/target.bat
----------------------------------------------------------------------
diff --git a/lib/cordova-blackberry/bin/templates/project/cordova/target.bat b/lib/cordova-blackberry/bin/templates/project/cordova/target.bat
new file mode 100755
index 0000000..545b79e
--- /dev/null
+++ b/lib/cordova-blackberry/bin/templates/project/cordova/target.bat
@@ -0,0 +1,21 @@
+@ECHO OFF
+goto comment
+       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.
+:comment
+
+@node.exe %~dp0\lib\target %*

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/88ad654c/lib/cordova-blackberry/bin/templates/project/cordova/third_party/data2xml/data2xml.js
----------------------------------------------------------------------
diff --git a/lib/cordova-blackberry/bin/templates/project/cordova/third_party/data2xml/data2xml.js b/lib/cordova-blackberry/bin/templates/project/cordova/third_party/data2xml/data2xml.js
new file mode 100644
index 0000000..8223d12
--- /dev/null
+++ b/lib/cordova-blackberry/bin/templates/project/cordova/third_party/data2xml/data2xml.js
@@ -0,0 +1,86 @@
+// --------------------------------------------------------------------------------------------------------------------
+//
+// data2xml.js - A data to XML converter with a nice interface (for NodeJS).
+//
+// Copyright (c) 2011 AppsAttic Ltd - http://www.appsattic.com/
+// Written by Andrew Chilton <ch...@appsattic.com>
+//
+// License: http://opensource.org/licenses/MIT
+//
+// --------------------------------------------------------------------------------------------------------------------
+
+var xmlHeader = '<?xml version="1.0" encoding="utf-8"?>\n';
+
+function entitify(str) {
+    str = '' + str;
+    str = str
+        .replace(/&/g, '&amp;')
+        .replace(/</g,'&lt;')
+        .replace(/>/g,'&gt;')
+        .replace(/'/g, '&apos;')
+        .replace(/"/g, '&quot;');
+    return str;
+}
+
+function makeStartTag(name, attr) {
+    attr = attr || {};
+    var tag = '<' + name;
+    for(var a in attr) {
+        tag += ' ' + a + '="' + entitify(attr[a]) + '"';
+    }
+    tag += '>';
+    return tag;
+}
+
+function makeEndTag(name) {
+    return '</' + name + '>';
+}
+
+function makeElement(name, data) {
+    var element = '';
+    if ( Array.isArray(data) ) {
+        data.forEach(function(v) {
+            element += makeElement(name, v);
+        });
+        return element;
+    }
+    else if ( typeof data === 'object' ) {
+        element += makeStartTag(name, data._attr);
+        if ( data._value ) {
+            element += entitify(data._value);
+        }
+/************** MODIFICATION [always execute else condition] ***************/
+        for (var el in data) {
+            /**************** MODIFICATION {if condition altered} **********************/
+            if ( el === '_attr'  || el === '_value') {
+                continue;
+            }
+            element += makeElement(el, data[el]);
+        }
+        element += makeEndTag(name);
+        return element;
+/***************************** END MODIFICATION ***************************/
+    }
+    else {
+        // a piece of data on it's own can't have attributes
+        return makeStartTag(name) + entitify(data) + makeEndTag(name);
+    }
+    throw "Unknown data " + data;
+}
+
+var data2xml = function(name, data) {
+    var xml = xmlHeader;
+    xml += makeElement(name, data);
+    return xml;
+};
+
+// --------------------------------------------------------------------------------------------------------------------
+
+data2xml.entitify = entitify;
+data2xml.makeStartTag = makeStartTag;
+data2xml.makeEndTag = makeEndTag;
+data2xml.makeElement = makeElement;
+
+module.exports = data2xml;
+
+// --------------------------------------------------------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/88ad654c/lib/cordova-blackberry/bin/templates/project/cordova/third_party/wrench/wrench.js
----------------------------------------------------------------------
diff --git a/lib/cordova-blackberry/bin/templates/project/cordova/third_party/wrench/wrench.js b/lib/cordova-blackberry/bin/templates/project/cordova/third_party/wrench/wrench.js
new file mode 100644
index 0000000..8c3d746
--- /dev/null
+++ b/lib/cordova-blackberry/bin/templates/project/cordova/third_party/wrench/wrench.js
@@ -0,0 +1,78 @@
+/*  wrench.js
+ *
+ *  A collection of various utility functions I've found myself in need of
+ *  for use with Node.js (http://nodejs.org/). This includes things like:
+ *
+ *  - Recursively deleting directories in Node.js (Sync, not Async)
+ *  - Recursively copying directories in Node.js (Sync, not Async)
+ *  - Recursively chmoding a directory structure from Node.js (Sync, not Async)
+ *  - Other things that I'll add here as time goes on. Shhhh...
+ *
+ *  ~ Ryan McGrath (ryan [at] venodesigns.net)
+ */
+
+/* This file is originally licensed under https://raw.github.com/ryanmcgrath/wrench-js/master/LICENSE
+ * This code has been copied from https://raw.github.com/ryanmcgrath/wrench-js and modified
+ * add the functionality for a callback to the copyDirSyncRecursive method.
+ * Modifications have been clearly marked.
+ * The callback acts like a filter and you must return true/false from it to include/exclude a file
+ */
+
+var wrench = require('wrench'),
+    fs = require("fs"),
+    _path = require("path");
+/*  wrench.copyDirSyncRecursive("directory_to_copy", "new_directory_location", opts);
+ *
+ *  Recursively dives through a directory and moves all its files to a new location. This is a
+ *  Synchronous function, which blocks things until it's done. If you need/want to do this in
+ *  an Asynchronous manner, look at wrench.copyDirRecursively() below.
+ *
+ *  Note: Directories should be passed to this function without a trailing slash.
+ */
+wrench.copyDirSyncRecursive = function(sourceDir, newDirLocation, opts, callback) {
+
+    /**************************Modification*****************************************/
+    if (typeof opts === "function") {
+        callback = opts;
+        opts = {};
+    }
+    /**************************Modification End*****************************************/
+
+    if (!opts || !opts.preserve) {
+        try {
+            if(fs.statSync(newDirLocation).isDirectory()) wrench.rmdirSyncRecursive(newDirLocation);
+        } catch(e) { }
+    }
+
+    /*  Create the directory where all our junk is moving to; read the mode of the source directory and mirror it */
+    var checkDir = fs.statSync(sourceDir);
+    try {
+        fs.mkdirSync(newDirLocation, checkDir.mode);
+    } catch (e) {
+        //if the directory already exists, that's okay
+        if (e.code !== 'EEXIST') throw e;
+    }
+
+    var files = fs.readdirSync(sourceDir);
+
+    for(var i = 0; i < files.length; i++) {
+        var currFile = fs.lstatSync(sourceDir + "/" + files[i]);
+        /**************************Modified to add if statement*****************************************/
+        if (callback && !callback(sourceDir + "/" + files[i], currFile)) {
+            continue;
+        }
+        if(currFile.isDirectory()) {
+            /*  recursion this thing right on back. */
+            wrench.copyDirSyncRecursive(sourceDir + "/" + files[i], newDirLocation + "/" + files[i], opts, callback);
+        } else if(currFile.isSymbolicLink()) {
+            var symlinkFull = fs.readlinkSync(sourceDir + "/" + files[i]);
+            fs.symlinkSync(symlinkFull, newDirLocation + "/" + files[i]);
+        } else {
+            /*  At this point, we've hit a file actually worth copying... so copy it on over. */
+            var contents = fs.readFileSync(sourceDir + "/" + files[i]);
+            fs.writeFileSync(newDirLocation + "/" + files[i], contents);
+        }
+    }
+};
+
+

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/88ad654c/lib/cordova-blackberry/bin/templates/project/native/device/plugins/jnext/auth.txt
----------------------------------------------------------------------
diff --git a/lib/cordova-blackberry/bin/templates/project/native/device/plugins/jnext/auth.txt b/lib/cordova-blackberry/bin/templates/project/native/device/plugins/jnext/auth.txt
new file mode 100644
index 0000000..0983f4f
--- /dev/null
+++ b/lib/cordova-blackberry/bin/templates/project/native/device/plugins/jnext/auth.txt
@@ -0,0 +1,3 @@
+local:/// *
+file:// *
+http:// *
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/88ad654c/lib/cordova-blackberry/bin/templates/project/native/device/wwe
----------------------------------------------------------------------
diff --git a/lib/cordova-blackberry/bin/templates/project/native/device/wwe b/lib/cordova-blackberry/bin/templates/project/native/device/wwe
new file mode 100644
index 0000000..0e48b92
--- /dev/null
+++ b/lib/cordova-blackberry/bin/templates/project/native/device/wwe
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec weblauncher "$@"
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/88ad654c/lib/cordova-blackberry/bin/templates/project/native/simulator/plugins/jnext/auth.txt
----------------------------------------------------------------------
diff --git a/lib/cordova-blackberry/bin/templates/project/native/simulator/plugins/jnext/auth.txt b/lib/cordova-blackberry/bin/templates/project/native/simulator/plugins/jnext/auth.txt
new file mode 100644
index 0000000..0983f4f
--- /dev/null
+++ b/lib/cordova-blackberry/bin/templates/project/native/simulator/plugins/jnext/auth.txt
@@ -0,0 +1,3 @@
+local:/// *
+file:// *
+http:// *
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/88ad654c/lib/cordova-blackberry/bin/templates/project/native/simulator/wwe
----------------------------------------------------------------------
diff --git a/lib/cordova-blackberry/bin/templates/project/native/simulator/wwe b/lib/cordova-blackberry/bin/templates/project/native/simulator/wwe
new file mode 100644
index 0000000..0e48b92
--- /dev/null
+++ b/lib/cordova-blackberry/bin/templates/project/native/simulator/wwe
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec weblauncher "$@"
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/88ad654c/lib/cordova-blackberry/bin/templates/project/playbook.xml
----------------------------------------------------------------------
diff --git a/lib/cordova-blackberry/bin/templates/project/playbook.xml b/lib/cordova-blackberry/bin/templates/project/playbook.xml
deleted file mode 100644
index 7250cbc..0000000
--- a/lib/cordova-blackberry/bin/templates/project/playbook.xml
+++ /dev/null
@@ -1,338 +0,0 @@
-<project default="help">
-<!-- 
-       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.
--->    
-    <!-- LOAD PROPERTIES -->
-    
-    <property prefix="properties" file="project.properties" />
-    <property name="build.dir"    location="build" />
-    <property name="widget.dir"   location="${build.dir}/widget" />
-    <property name="code.sign"    value="false" />
-    <property name="generate.ext"   value="cod" />
-    <property name="build.num.file" value="buildId.txt" />
-    
-    <!-- BlackBerry WebWorks Packager for Tablets directory is required. -->
-    <fail unless="properties.playbook.bbwp.dir" message="Please specify BlackBerry WebWorks Packager directory using 'playbook.bbwp.dir' in your 'project.properties' file." />
-
-    <!-- OS identification -->
-    <condition property="isMacOSX" else="false">
-        <and>
-            <os family="mac" />
-            <os family="unix" />
-        </and>
-    </condition>
-
-    <condition property="bbwp" value="${properties.playbook.bbwp.dir}/bbwp" else="${properties.playbook.bbwp.dir}/bbwp.exe">
-        <equals arg1="${isMacOSX}" arg2="true" />
-    </condition>
-
-    <condition property="blackberry-deploy" value="${properties.playbook.bbwp.dir}/blackberry-tablet-sdk/bin/blackberry-deploy" else="${properties.playbook.bbwp.dir}/blackberry-tablet-sdk/bin/blackberry-deploy.bat">
-        <equals arg1="${isMacOSX}" arg2="true" />
-    </condition>
-
-    <condition property="blackberry-debugtokenrequest" value="${properties.playbook.bbwp.dir}/blackberry-tablet-sdk/bin/blackberry-debugtokenrequest" else="${properties.playbook.bbwp.dir}/blackberry-tablet-sdk/bin/blackberry-debugtokenrequest.bat">
-        <equals arg1="${isMacOSX}" arg2="true" />
-    </condition>
-
-    <!-- LOAD DEVICE -->
-    
-    <target name="load-device" depends="package-app">
-        <bbwp code-sign="true" />
-
-        <exec executable="${blackberry-deploy}" dir="." failonerror="true">
-            <arg value="-installApp" />
-            <arg value="-launchApp" />
-            <arg value="-device" />
-            <arg value="${properties.playbook.device.ip}" />
-            <arg value="-password" />
-            <arg value="${properties.playbook.device.password}" />
-            <arg value="-package" />
-            <arg file="${build.dir}/${cod.name}.bar" />
-        </exec>
-    </target>
-    
-    <!-- DEBUG-LOAD DEVICE -->
-    
-    <target name="debug-device" depends="package-app">
-        <if>
-            <equals arg1="${properties.playbook.device.pin}" arg2="" />
-            <then>
-                <echo>
-                    If you fill in the playbook.device.pin value you can use debug tokens!
-                    This means you won't have to worry about having a unique version in config.xml every time.
-                </echo>
-                <bbwp code-sign="true" debug="true" />
-            </then>
-            <else>
-                <generate-debug-token />
-                <bbwp code-sign="false" debug="true" />
-            </else>
-        </if>
-
-        <exec executable="${blackberry-deploy}" dir="." failonerror="true">
-            <arg value="-installApp" />
-            <arg value="-launchApp" />
-            <arg value="-device" />
-            <arg value="${properties.playbook.device.ip}" />
-            <arg value="-password" />
-            <arg value="${properties.playbook.device.password}" />
-            <arg value="-package" />
-            <arg file="${build.dir}/${cod.name}.bar" />
-        </exec>
-    </target>
-    
-    <!-- LOAD SIMULATOR -->
-    
-    <target name="load-simulator" depends="build">
-
-        <echo>This tool will not open the simulator for you </echo>
-
-        <exec executable="${blackberry-deploy}" dir="." failonerror="true">
-            <arg value="-installApp" />
-            <arg value="-launchApp" />
-            <arg value="-device" />
-            <arg value="${properties.playbook.sim.ip}" />
-            <arg value="-password" />
-            <arg value="${properties.playbook.sim.password}" />
-            <arg value="-package" />
-            <arg file="${build.dir}/${cod.name}.bar" />
-        </exec>
-    </target>
-    
-    <target name="debug-simulator" depends="package-app">
-        <bbwp code-sign="false" debug="true" />
-        <echo>This tool will not open the simulator for you </echo>
-
-        <exec executable="${blackberry-deploy}" dir="." failonerror="true">
-            <arg value="-installApp" />
-            <arg value="-launchApp" />
-            <arg value="-device" />
-            <arg value="${properties.playbook.sim.ip}" />
-            <arg value="-password" />
-            <arg value="${properties.playbook.sim.password}" />
-            <arg value="-package" />
-            <arg file="${build.dir}/${cod.name}.bar" />
-        </exec>
-    </target>
-    <!-- PACKAGE-APP -->
-    
-    <target name="package-app" depends="generate-cod-name, clean">
-        <!-- Copy the WebWorks application -->
-        <mkdir dir="${widget.dir}" />
-        <copy todir="${widget.dir}" overwrite="true">
-            <fileset dir="www" >
-                <exclude name="ext/**"/>
-                <exclude name="ext-air/**"/>
-                <exclude name="res/resourceBundles/**"/>
-            </fileset>
-        </copy>
-        
-        <!-- Update WebWorks Packager with the AIR APIs -->
-        <copy todir="${properties.playbook.bbwp.dir}\ext" overwrite="true">
-            <fileset dir="www/ext-air" excludes="README.md" />
-        </copy>
-        
-        <!-- Package the WebWorks app by zipping the widget dir. -->
-        <mkdir dir="${build.dir}" />
-        <zip compress="false" destfile="${build.dir}/${cod.name}.zip" basedir="${widget.dir}" excludes="**/build/**,**/.settings/**,**/.project" />
-    </target>
-    
-    <!-- BUILD -->
-
-    <target name="build" depends="package-app">
-        <bbwp code-sign="${code.sign}" />
-    </target>
-
-    <!-- BBWP MACRO -->
-
-    <macrodef name="bbwp">
-        <attribute name="code-sign" default="false" />
-        <attribute name="debug" default="false" />
-        <sequential>
-            <!-- check if debug flag was passed in and set an appropriate flag for CLI exec of bbwp -->
-            <if>
-                <equals arg1="@{debug}" arg2="true" />
-                <then>
-                    <property name="debug.flag" value="-d" />
-                </then>
-                <else>
-                    <property name="debug.flag" value="" />
-                </else>
-            </if>
-            <buildnumber file="${build.num.file}" />
-            <if>
-                <equals arg1="@{code-sign}" arg2="true" />
-                <then>
-                    <exec executable="${bbwp}">
-                        <arg file="${build.dir}/${cod.name}.zip" />
-                        <arg value="-gcsk" />
-                        <arg value="${properties.playbook.sigtool.csk.password}" />
-                        <arg value="-gp12" />
-                        <arg value="${properties.playbook.sigtool.p12.password}" />
-                        <arg value="-o" />
-                        <arg file="${build.dir}" />
-                        <arg line="${debug.flag} -buildId" />
-                        <arg value="${build.number}" />
-                    </exec>
-                </then>
-                <else>
-                    <exec executable="${bbwp}">
-                        <arg file="${build.dir}/${cod.name}.zip" />
-                        <arg value="-o" />
-                        <arg file="${build.dir}" />
-                        <arg line="${debug.flag} -buildId" />
-                        <arg value="${build.number}" />
-                    </exec>
-                </else>
-            </if>
-        </sequential>
-    </macrodef>
-
-    <!-- install debug token" -->
-    <macrodef name="generate-debug-token">
-        <sequential>
-            <exec executable="${blackberry-debugtokenrequest}" dir="." failonerror="true">
-                <arg value="-storepass" />
-                <arg value="${properties.playbook.sigtool.csk.password}" />
-                <arg value="-deviceID" />
-                <arg value="0x${properties.playbook.device.pin}" />
-                <arg file="${properties.playbook.bbwp.dir}/debugtoken.bar" />
-            </exec>
-
-            <exec executable="${blackberry-deploy}" dir="." failonerror="true">
-                <arg value="-installApp" />
-                <arg value="-launchApp" />
-                <arg value="-device" />
-                <arg value="${properties.playbook.device.ip}" />
-                <arg value="-password" />
-                <arg value="${properties.playbook.device.password}" />
-                <arg value="-package" />
-                <arg file="${properties.playbook.bbwp.dir}/debugtoken.bar" />
-            </exec>
-
-            <replaceregexp 
-                file="${properties.playbook.bbwp.dir}/bin/bbwp.properties" 
-                match='&lt;debug_token&gt;.*&lt;\/debug_token&gt;'
-                replace='&lt;debug_token&gt;${properties.playbook.bbwp.dir}/debugtoken.bar&lt;/debug_token&gt;'
-                byline='true'/>
-        </sequential>
-    </macrodef>
-
-    <!-- CLEAN -->
-    
-    <target name="clean">
-        <delete dir="${build.dir}" />
-        <delete dir="${widget.dir}" />
-    </target>
-    
-    <!-- CLEAN DEVICE -->
-    
-    <target name="clean-device" depends="generate-cod-name">
-        <exec executable="${blackberry-deploy}" dir="." failonerror="true">
-            <arg value="-uninstallApp" />
-            <arg value="-device" />
-            <arg value="${properties.playbook.device.ip}" />
-            <arg value="-password" />
-            <arg value="${properties.playbook.device.password}" />
-            <arg value="-package" />
-            <arg file="${build.dir}/${cod.name}.bar" />
-        </exec>
-    </target>
-    
-    <!-- CLEAN SIMULATOR -->
-    
-    <target name="clean-simulator" depends="generate-cod-name">
-        <exec executable="${blackberry-deploy}" dir="." failonerror="true">
-            <arg value="-uninstallApp" />
-            <arg value="-device" />
-            <arg value="${properties.playbook.sim.ip}" />
-            <arg value="-password" />
-            <arg value="${properties.playbook.sim.password}" />
-            <arg value="-package" />
-            <arg file="${build.dir}/${cod.name}.bar" />
-        </exec>
-    </target>
-    
-        <!-- HELPER TASKS -->
-    
-    <target name="generate-cod-name">
-        <xmlproperty file="www/config.xml" prefix="config.xml" />
-        <propertyregex property="cod.name"
-                       input="${config.xml.widget.name}"
-                       regexp="(\W+)"
-                       replace=""
-                       casesensitive="false"
-                       global="true"
-                       defaultValue="${config.xml.widget.name}" />
-        <echo message="Generated name: ${cod.name}.bar" />
-    </target>
-
-    <!-- HELP -->
-
-    <target name="help">
-        <echo>
-NAME
-  ${ant.project.name}
-
-SYNOPSIS
-  ant TARGET COMMAND [-D&lt;argument&gt;=&lt;value&gt;]...
-
-DESCRIPTION
-  You can build and deploy your project to a device or simulator.
-  
-TARGETS
-  blackberry ........ Builds a cod file and deploys to a device or simulator
- 
-  playbook .......... Builds a bar file and deploys to a device or simulator
-
-COMMANDS
-  help .............. Show this help menu.
-                        ant, ant help
-
-  load-device ....... Builds and deploys project to a connected USB device.
-                        ant load-device
-
-  load-simulator .... Builds and deploys project to default simulator.
-                        ant load-simulator
-
-  build ............. Compiles and packages the project for deployment.
-                        ant build
-
-  clean ............. Remove all files from the build/ directory.
-                        ant clean
-
-  clean-device ...... Remove this project from the connected USB device.
-                        ant clean-device
-
-  clean-simulator ... Remove this project from the simulator (takes a while).
-                        ant clean-simulator
-
-GETTING STARTED
-  1. Edit project.properties
-
-  2. &lt;ant &lt;TARGET&gt; load-simulator&gt; to run the project on the simulator
-
-  3. Customize your project by editing www/config.xml
-
-  4. To run the project on a BlackBerry device, you will need to obtain
-     code signing keys from RIM. Once you have the key, a project is
-     installed by connecting a BlackBerry via USB and running
-     &lt;ant &lt;TARGET&gt; load-device&gt;.
-        </echo>
-    </target>
-</project>

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/88ad654c/lib/cordova-blackberry/bin/templates/project/project.json
----------------------------------------------------------------------
diff --git a/lib/cordova-blackberry/bin/templates/project/project.json b/lib/cordova-blackberry/bin/templates/project/project.json
new file mode 100644
index 0000000..97bbb24
--- /dev/null
+++ b/lib/cordova-blackberry/bin/templates/project/project.json
@@ -0,0 +1,6 @@
+{
+    "barName": "cordova-BB10-app",
+    "keystorepass": "password",
+    "defaultTarget": "",
+    "targets": {}
+}

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/88ad654c/lib/cordova-blackberry/bin/templates/project/project.properties
----------------------------------------------------------------------
diff --git a/lib/cordova-blackberry/bin/templates/project/project.properties b/lib/cordova-blackberry/bin/templates/project/project.properties
deleted file mode 100644
index 71e5bc1..0000000
--- a/lib/cordova-blackberry/bin/templates/project/project.properties
+++ /dev/null
@@ -1,137 +0,0 @@
-# BlackBerry WebWorks Packager Directory
-#
-#   The BlackBerry WebWorks Packager (bbwp) is required for compiling and packaging
-#   BlackBerry WebWorks applications for deployment to a BlackBerry device
-#   or simulator.  The bbwp utility is installed with the standalone BlackBerry 
-#   WebWorks SDK, and as part of the BlackBerry Web Plugin for Eclipse.
-#
-#   Please specify the location of the BlackBerry WebWorks Packager in your
-#   environment.
-#
-#   Typical location of bbwp for standalone BlackBerry WebWorks SDK installation:
-#     C:\Program Files (x86)\Research In Motion\BlackBerry Widget Packager
-#
-#   Typical location of bbwp for BlackBerry Web Plugin for Eclipse installation:
-#     C:\Eclipse-3.5.2\plugins\net.rim.browser.tools.wcpc_1.0.0.201003191451-126\wcpc
-#
-#   The ANT script is brittle and requires you to escape the backslashes.
-#     e.g. C:\some\path must be C:\\some\\path
-#
-#   Please remember to:
-#     - Double escape your backslahses (i.e. \ must be \\)
-#     - Do not add a trailing slash (e.g. C:\some\path)
-#
-blackberry.bbwp.dir=C:\\Program Files\\Research In Motion\\BlackBerry WebWorks Packager
-playbook.bbwp.dir=C:\\Program Files\\Research In Motion\\BlackBerry WebWorks SDK for TabletOS 2.1.0.6\\bbwp
-qnx.bbwp.dir=/Developer/SDKs/Research In Motion/BlackBerry 10 WebWorks SDK 1.0.4.7
-
-# (Optional) Simulator Directory 
-# 
-#   If sim.dir is not specified, the build script will use the simulator directory 
-#   within the BlackBerry WebWorks Packager.
-#
-blackberry.sim.dir=C:\\Program Files\\Research In Motion\BlackBerry WebWorks Packager\\simpack\\6.0.0.227
-
-# (Optional) Simulator Binary 
-# 
-#   If sim.bin is not specified, the build script will attempt to use the default
-#   simulator in the simulator directory.  
-#
-#blackberry.sim.bin=9700.bat
-
-# (Optional) MDS Directory 
-# 
-#   If mds.dir is not specified, the build script will attempt to use the MDS that 
-#   is installed with the BlackBerry WebWorks Packager.
-#
-blackberry.mds.dir=C:\\Program Files\\Research In Motion\\BlackBerry WebWorks Packager\\mds
-
-# BlackBerry Code Signing Password
-#
-#   If you leave this field blank, then
-#   the signing tool will prompt you each time
-#
-blackberry.sigtool.password=
-
-# Playbook Code Signing Password
-#
-#   If you leave these fields blank, then
-#   signing will fail
-#
-playbook.sigtool.csk.password=
-playbook.sigtool.p12.password=
-
-# BB10 Code Signing Password
-qnx.sigtool.password=
-
-# BlackBerry Simulator Password
-#
-#   If you leave this field blank, then
-#   you cannot deploy to simulator
-#
-blackberry.sim.password=
-
-# Playbook Simulator IP
-#
-#   If you leave this field blank, then
-#   you cannot deploy to simulator
-#
-playbook.sim.ip=
-
-# Playbook Simulator Password
-#
-#   If you leave this field blank, then
-#   you cannot deploy to simulator
-#
-playbook.sim.password=
-
-# Playbook Device IP
-#
-#   If you leave this field blank, then
-#   you cannot deploy to device
-#
-playbook.device.ip=
-
-# Playbook Device Password
-#
-#   If you leave this field blank, then
-#   you cannot deploy to device
-#
-playbook.device.password=
-# PlayBook Device PIN
-#
-#   Fill this value in to use debug tokens when debuging on the device
-playbook.device.pin=
-
-# QNX Simulator IP
-#
-#   If you leave this field blank, then
-#   you cannot deploy to simulator
-#
-qnx.sim.ip=
-
-# QNX Simulator Password
-#
-#   If you leave this field blank, then
-#   you cannot deploy to simulator
-#
-qnx.sim.password=
-
-# QNX Device IP
-#
-#   If you leave this field blank, then
-#   you cannot deploy to device
-#
-qnx.device.ip=
-
-# QNX Device Password
-#
-#   If you leave this field blank, then
-#   you cannot deploy to device
-#
-qnx.device.password=
-
-# QNX Device PIN
-#
-#   Fill this value in to use debug tokens when debuging on the device
-qnx.device.pin=

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/88ad654c/lib/cordova-blackberry/bin/templates/project/qnx.xml
----------------------------------------------------------------------
diff --git a/lib/cordova-blackberry/bin/templates/project/qnx.xml b/lib/cordova-blackberry/bin/templates/project/qnx.xml
deleted file mode 100644
index d2e2de7..0000000
--- a/lib/cordova-blackberry/bin/templates/project/qnx.xml
+++ /dev/null
@@ -1,336 +0,0 @@
-<project default="help">
-<!-- 
-       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.
--->    
-    <!-- LOAD PROPERTIES -->
-    
-    <property prefix="properties" file="project.properties" />
-    <property name="build.dir"    location="build" />
-    <property name="widget.dir"   location="${build.dir}/widget" />
-    <property name="code.sign"    value="false" />
-    <property name="generate.ext"   value="cod" />
-    <property name="build.num.file" value="buildId.txt" />
-    
-    <!-- BlackBerry WebWorks Packager for Tablets directory is required. -->
-    <fail unless="properties.qnx.bbwp.dir" message="Please specify BlackBerry WebWorks Packager directory using 'qnx.bbwp.dir' in your 'project.properties' file." />
-
-    <!-- OS identification -->
-    <condition property="isMacOSX" else="false">
-        <and>
-            <os family="mac" />
-            <os family="unix" />
-        </and>
-    </condition>
-
-    <condition property="bbwp" value="${properties.qnx.bbwp.dir}/bbwp" else="${properties.qnx.bbwp.dir}/bbwp.bat">
-        <equals arg1="${isMacOSX}" arg2="true" />
-    </condition>
-
-    <condition property="blackberry-deploy" value="${properties.qnx.bbwp.dir}/dependencies/tools/bin/blackberry-deploy" else="${properties.qnx.bbwp.dir}/dependencies/tools/bin/blackberry-deploy.bat">
-        <equals arg1="${isMacOSX}" arg2="true" />
-    </condition>
-
-    <condition property="blackberry-debugtokenrequest" value="${properties.qnx.bbwp.dir}/dependencies/tools/bin/blackberry-debugtokenrequest" else="${properties.qnx.bbwp.dir}/dependencies/tools/bin/blackberry-debugtokenrequest.bat">
-        <equals arg1="${isMacOSX}" arg2="true" />
-    </condition>
-
-    <!-- LOAD DEVICE -->
-    
-    <target name="load-device" depends="package-app">
-        <bbwp code-sign="true" />
-
-        <exec executable="${blackberry-deploy}" dir="." failonerror="true">
-            <arg value="-installApp" />
-            <arg value="-launchApp" />
-            <arg value="-device" />
-            <arg value="${properties.qnx.device.ip}" />
-            <arg value="-password" />
-            <arg value="${properties.qnx.device.password}" />
-            <arg value="-package" />
-            <arg file="${build.dir}/device/${cod.name}.bar" />
-        </exec>
-    </target>
-    
-    <!-- DEBUG-LOAD DEVICE -->
-    
-    <target name="debug-device" depends="package-app">
-        <if>
-            <equals arg1="${properties.qnx.device.pin}" arg2="" />
-            <then>
-                <echo>
-                    If you fill in the qnx.device.pin value you can use debug tokens!
-                    This means you won't have to worry about having a unique version in config.xml every time.
-                </echo>
-                <bbwp code-sign="true" debug="true" />
-            </then>
-            <else>
-                <generate-debug-token />
-                <bbwp code-sign="false" debug="true" />
-            </else>
-        </if>
-
-        <exec executable="${blackberry-deploy}" dir="." failonerror="true">
-            <arg value="-installApp" />
-            <arg value="-launchApp" />
-            <arg value="-device" />
-            <arg value="${properties.qnx.device.ip}" />
-            <arg value="-password" />
-            <arg value="${properties.qnx.device.password}" />
-            <arg value="-package" />
-            <arg file="${build.dir}/device/${cod.name}.bar" />
-        </exec>
-    </target>
-    
-    <!-- LOAD SIMULATOR -->
-    
-    <target name="load-simulator" depends="build">
-
-        <echo>This tool will not open the simulator for you </echo>
-
-        <exec executable="${blackberry-deploy}" dir="." failonerror="true">
-            <arg value="-installApp" />
-            <arg value="-launchApp" />
-            <arg value="-device" />
-            <arg value="${properties.qnx.sim.ip}" />
-            <arg value="-password" />
-            <arg value="${properties.qnx.sim.password}" />
-            <arg value="-package" />
-            <arg file="${build.dir}/simulator/${cod.name}.bar" />
-        </exec>
-    </target>
-    
-    <target name="debug-simulator" depends="package-app">
-
-        <bbwp code-sign="false" debug="true" />
-        <echo>This tool will not open the simulator for you </echo>
-
-        <exec executable="${blackberry-deploy}" dir="." failonerror="true">
-            <arg value="-installApp" />
-            <arg value="-launchApp" />
-            <arg value="-device" />
-            <arg value="${properties.qnx.sim.ip}" />
-            <arg value="-password" />
-            <arg value="${properties.qnx.sim.password}" />
-            <arg value="-package" />
-            <arg file="${build.dir}/simulator/${cod.name}.bar" />
-        </exec>
-    </target>
-
-    <!-- PACKAGE-APP -->
-    
-    <target name="package-app" depends="generate-cod-name, clean">
-        <!-- Copy the WebWorks application -->
-        <mkdir dir="${widget.dir}" />
-        <copy todir="${widget.dir}" overwrite="true">
-            <fileset dir="www" >
-                <exclude name="ext/**"/>
-                <exclude name="ext-air/**"/>
-                <exclude name="res/resourceBundles/**"/>
-            </fileset>
-        </copy>
-        
-        <!-- Update WebWorks Packager with the QNX APIs -->
-        <copy todir="${properties.qnx.bbwp.dir}\Framework\ext" overwrite="true">
-            <fileset dir="www/ext-qnx" excludes="readme.md" />
-        </copy>
-
-        <!-- Package the WebWorks app by zipping the widget dir. -->
-        <mkdir dir="${build.dir}" />
-        <zip compress="false" destfile="${build.dir}/${cod.name}.zip" basedir="${widget.dir}" excludes="**/build/**,**/.settings/**,**/.project" />
-    </target>
-    
-    <!-- BUILD -->
-
-    <target name="build" depends="package-app">
-        <bbwp code-sign="${code.sign}" />
-    </target>
-
-    <!-- BBWP MACRO -->
-
-    <macrodef name="bbwp">
-        <attribute name="code-sign" default="false" />
-        <attribute name="debug" default="false" />
-        <sequential>
-            <!-- check if debug flag was passed in and set an appropriate flag for CLI exec of bbwp -->
-            <if>
-                <equals arg1="@{debug}" arg2="true" />
-                <then>
-                    <property name="debug.flag" value="-d" />
-                </then>
-                <else>
-                    <property name="debug.flag" value="" />
-                </else>
-            </if>
-            <buildnumber file="${build.num.file}" />
-            <if>
-                <equals arg1="@{code-sign}" arg2="true" />
-                <then>
-                    <exec executable="${bbwp}">
-                        <arg file="${build.dir}/${cod.name}.zip" />
-                        <arg value="-g" />
-                        <arg value="${properties.qnx.sigtool.password}" />
-                        <arg value="-o" />
-                        <arg file="${build.dir}" />
-                        <arg line="${debug.flag} -b" />
-                        <arg value="${build.number}" />
-                        <arg value="--loglevel" />
-                        <arg value="error" />
-                    </exec>
-                </then>
-                <else>
-                    <exec executable="${bbwp}">
-                        <arg file="${build.dir}/${cod.name}.zip" />
-                        <arg value="-o" />
-                        <arg file="${build.dir}" />
-                        <arg line="${debug.flag}" />
-                        <arg value="--loglevel" />
-                        <arg value="error" />
-                    </exec>
-                </else>
-            </if>
-        </sequential>
-    </macrodef>
-
-    <!-- install debug token" -->
-    <macrodef name="generate-debug-token">
-        <sequential>
-            <exec executable="${blackberry-debugtokenrequest}" dir="." failonerror="true">
-                <arg value="-storepass" />
-                <arg value="${properties.qnx.sigtool.password}" />
-                <arg value="-deviceID" />
-                <arg value="0x${properties.qnx.device.pin}" />
-                <arg file="${properties.qnx.bbwp.dir}/debugtoken.bar" />
-            </exec>
-
-            <exec executable="${blackberry-deploy}" dir="." failonerror="true">
-                <arg value="-installApp" />
-                <arg value="-device" />
-                <arg value="${properties.qnx.device.ip}" />
-                <arg value="-password" />
-                <arg value="${properties.qnx.device.password}" />
-                <arg value="-package" />
-                <arg file="${properties.qnx.bbwp.dir}/debugtoken.bar" />
-            </exec>
-        </sequential>
-    </macrodef>
-
-
-    <!-- CLEAN -->
-    
-    <target name="clean">
-        <delete dir="${build.dir}" />
-        <delete dir="${widget.dir}" />
-    </target>
-    
-    <!-- CLEAN DEVICE -->
-    
-    <target name="clean-device" depends="generate-cod-name">
-        <exec executable="${blackberry-deploy}" dir="." failonerror="true">
-            <arg value="-uninstallApp" />
-            <arg value="-device" />
-            <arg value="${properties.qnx.device.ip}" />
-            <arg value="-password" />
-            <arg value="${properties.qnx.device.password}" />
-            <arg value="-package" />
-            <arg file="${build.dir}/device/${cod.name}.bar" />
-        </exec>
-    </target>
-    
-    <!-- CLEAN SIMULATOR -->
-    
-    <target name="clean-simulator" depends="generate-cod-name">
-        <exec executable="${blackberry-deploy}" dir="." failonerror="true">
-            <arg value="-uninstallApp" />
-            <arg value="-device" />
-            <arg value="${properties.qnx.sim.ip}" />
-            <arg value="-password" />
-            <arg value="${properties.qnx.sim.password}" />
-            <arg value="-package" />
-            <arg file="${build.dir}/simulator/${cod.name}.bar" />
-        </exec>
-    </target>
-    
-        <!-- HELPER TASKS -->
-    
-    <target name="generate-cod-name">
-        <xmlproperty file="www/config.xml" prefix="config.xml" />
-        <propertyregex property="cod.name"
-                       input="${config.xml.widget.name}"
-                       regexp="(\W+)"
-                       replace=""
-                       casesensitive="false"
-                       global="true"
-                       defaultValue="${config.xml.widget.name}" />
-        <echo message="Generated name: ${cod.name}.bar" />
-    </target>
-
-
-    <!-- HELP -->
-
-    <target name="help">
-        <echo>
-NAME
-  ${ant.project.name}
-
-SYNOPSIS
-  ant TARGET COMMAND [-D&lt;argument&gt;=&lt;value&gt;]...
-
-DESCRIPTION
-  You can build and deploy your project to a device or simulator.
-  
-TARGETS
-  blackberry ........ Builds a cod file and deploys to a device or simulator
- 
-  playbook .......... Builds a bar file and deploys to a device or simulator
-
-COMMANDS
-  help .............. Show this help menu.
-                        ant, ant help
-
-  load-device ....... Builds and deploys project to a connected USB device.
-                        ant load-device
-
-  load-simulator .... Builds and deploys project to default simulator.
-                        ant load-simulator
-
-  build ............. Compiles and packages the project for deployment.
-                        ant build
-
-  clean ............. Remove all files from the build/ directory.
-                        ant clean
-
-  clean-device ...... Remove this project from the connected USB device.
-                        ant clean-device
-
-  clean-simulator ... Remove this project from the simulator (takes a while).
-                        ant clean-simulator
-
-GETTING STARTED
-  1. Edit project.properties
-
-  2. &lt;ant &lt;TARGET&gt; load-simulator&gt; to run the project on the simulator
-
-  3. Customize your project by editing www/config.xml
-
-  4. To run the project on a BlackBerry device, you will need to obtain
-     code signing keys from RIM. Once you have the key, a project is
-     installed by connecting a BlackBerry via USB and running
-     &lt;ant &lt;TARGET&gt; load-device&gt;.
-        </echo>
-    </target>
-</project>

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/88ad654c/lib/cordova-blackberry/bin/templates/project/www/VERSION
----------------------------------------------------------------------
diff --git a/lib/cordova-blackberry/bin/templates/project/www/VERSION b/lib/cordova-blackberry/bin/templates/project/www/VERSION
index 24ba9a3..38f8e88 100644
--- a/lib/cordova-blackberry/bin/templates/project/www/VERSION
+++ b/lib/cordova-blackberry/bin/templates/project/www/VERSION
@@ -1 +1 @@
-2.7.0
+dev

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/88ad654c/lib/cordova-blackberry/bin/templates/project/www/config.xml
----------------------------------------------------------------------
diff --git a/lib/cordova-blackberry/bin/templates/project/www/config.xml b/lib/cordova-blackberry/bin/templates/project/www/config.xml
index 0de8bb5..3edc941 100644
--- a/lib/cordova-blackberry/bin/templates/project/www/config.xml
+++ b/lib/cordova-blackberry/bin/templates/project/www/config.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- 
+<!--
        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
@@ -24,63 +24,28 @@
 
 <widget xmlns="http://www.w3.org/ns/widgets"
         xmlns:rim="http://www.blackberry.com/ns/widgets"
-	version="1.0.0.0" id="__PACKAGE__">
+	version="1.0.0" id="default.app.id">
 
-  <name>__NAME__</name>
+  <name>Webworks Application</name>
 
   <author>Your Name Here</author>
 
   <description>
        A sample Apache Cordova application that responds to the deviceready event.
   </description>
-    
+
   <license href="http://opensource.org/licenses/alphabetical">
   </license>
 
-  <!-- Cordova API -->
-  <feature id="blackberry.system" required="true" version="1.0.0.0" />
-  <feature id="org.apache.cordova" required="true" version="1.0.0" />
-  <feature id="blackberry.find" required="true" version="1.0.0.0" />
-  <feature id="blackberry.identity" required="true" version="1.0.0.0" />
-  <feature id="blackberry.identity.phone" required="true" version="1.0.0.0" />
-  <feature id="blackberry.pim.Address" required="true" version="1.0.0.0" />
-  <feature id="blackberry.pim.Contact" required="true" version="1.0.0.0" />
-  <feature id="blackberry.io.file" required="true" version="1.0.0.0" />
-  <feature id="blackberry.utils" required="true" version="1.0.0.0" />
-  <feature id="blackberry.io.dir" required="true" version="1.0.0.0" />
-  <feature id="blackberry.app" required="true" version="1.0.0.0" />
-  <feature id="blackberry.app.event" required="true" version="1.0.0.0" />
-  <feature id="blackberry.system.event" required="true" version="1.0.0.0"/>
-  <feature id="blackberry.widgetcache" required="true" version="1.0.0.0"/>
-  <feature id="blackberry.media.camera" />
-  <feature id="blackberry.ui.dialog" />
-  <feature id="blackberry.connection" />
-  <feature id="blackberry.bbm.platform" />
-  <feature id="blackberry.invoke.card" />
-  <feature id="blackberry.pim.contacts" />
-  <feature id="blackberry.ui.contextmenu" />
-  <feature id="blackberry.io.filetransfer" />
-  <feature id="blackberry.io" />
-  <feature id="blackberry.invoke" />
-  <feature id="blackberry.invoked" />
-  <feature id="blackberry.push" />
-  <feature id="blackberry.media.microphone" required="true" version="1.0.0.0"/>
-  
-  <!-- Cordova API -->
+  <!-- Expose access to all URIs, including the file and http protocols -->
   <access subdomains="true" uri="file:///store/home" />
   <access subdomains="true" uri="file:///SDCard" />
-
-  <!-- Expose access to all URIs, including the file and http protocols -->
   <access subdomains="true" uri="*" />
 
-  <icon rim:hover="false" src="res/icon/blackberry/icon-80.png" />
-  <icon rim:hover="true" src="res/icon/blackberry/icon-80.png" />
-
-  <rim:loadingScreen backgroundColor="#CFCFCF"
-                     foregroundImage="res/screen/blackberry/screen-225.png"
-		     onFirstLaunch="true">
-    <rim:transitionEffect type="fadeOut" />
-  </rim:loadingScreen>
+  <icon src="res/icon/blackberry/icon-80.png" />
+  <rim:splash src="res/screen/blackberry/splash-1280x768.png" />
+  <rim:splash src="res/screen/blackberry/splash-720x720.png" />
+  <rim:splash src="res/screen/blackberry/splash-768x1280.png" />
 
   <content src="index.html" />
 
@@ -89,8 +54,8 @@
     <rim:permit>read_device_identifying_information</rim:permit>
     <rim:permit>access_shared</rim:permit>
     <rim:permit>read_geolocation</rim:permit>
-    <rim:permit>record_audio</rim:permit> 
-    <rim:permit>access_pimdomain_contacts</rim:permit> 
+    <rim:permit>record_audio</rim:permit>
+    <rim:permit>access_pimdomain_contacts</rim:permit>
   </rim:permissions>
 
 </widget>

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/88ad654c/lib/cordova-blackberry/bin/templates/project/www/index.html
----------------------------------------------------------------------
diff --git a/lib/cordova-blackberry/bin/templates/project/www/index.html b/lib/cordova-blackberry/bin/templates/project/www/index.html
index 564ce18..ce767eb 100644
--- a/lib/cordova-blackberry/bin/templates/project/www/index.html
+++ b/lib/cordova-blackberry/bin/templates/project/www/index.html
@@ -33,7 +33,7 @@
                 <p class="event received">Device is Ready</p>
             </div>
         </div>
-        <script type="text/javascript" src="cordova-2.7.0.js"></script>
+        <script type="text/javascript" src="cordova-dev.js"></script>
         <script type="text/javascript" src="js/index.js"></script>
         <script type="text/javascript">
             app.initialize();

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/88ad654c/lib/cordova-blackberry/bin/templates/project/www/plugins.xml
----------------------------------------------------------------------
diff --git a/lib/cordova-blackberry/bin/templates/project/www/plugins.xml b/lib/cordova-blackberry/bin/templates/project/www/plugins.xml
deleted file mode 100644
index 3d41236..0000000
--- a/lib/cordova-blackberry/bin/templates/project/www/plugins.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 
-       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.
--->
-<plugins>
-  <plugin name="App"            value="org.apache.cordova.app.App"/>
-  <plugin name="Device"         value="org.apache.cordova.device.Device"/>
-  <plugin name="Camera"         value="org.apache.cordova.camera.Camera"/>
-  <plugin name="NetworkStatus"  value="org.apache.cordova.network.Network"/>
-  <plugin name="Notification"   value="org.apache.cordova.notification.Notification"/>
-  <plugin name="Accelerometer"  value="org.apache.cordova.accelerometer.Accelerometer"/>
-  <plugin name="Geolocation"    value="org.apache.cordova.geolocation.Geolocation"/>
-  <plugin name="File"           value="org.apache.cordova.file.FileManager"/>
-  <plugin name="FileTransfer"   value="org.apache.cordova.http.FileTransfer"/>
-  <plugin name="Contacts"       value="org.apache.cordova.pim.Contact"/>
-  <plugin name="Capture"        value="org.apache.cordova.capture.MediaCapture"/>
-  <plugin name="Battery"        value="org.apache.cordova.battery.Battery"/>
-  <plugin name="Media"          value="org.apache.cordova.media.Media"/>
-  <plugin name="Globalization"  value="org.apache.cordova.globalization.Globalization"/>
-</plugins>

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/88ad654c/lib/cordova-blackberry/bin/templates/project/www/res/screen/blackberry/screen-225.png
----------------------------------------------------------------------
diff --git a/lib/cordova-blackberry/bin/templates/project/www/res/screen/blackberry/screen-225.png b/lib/cordova-blackberry/bin/templates/project/www/res/screen/blackberry/screen-225.png
deleted file mode 100644
index 29873e9..0000000
Binary files a/lib/cordova-blackberry/bin/templates/project/www/res/screen/blackberry/screen-225.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/88ad654c/lib/cordova-blackberry/bin/templates/project/www/res/screen/blackberry/splash-1280x768.png
----------------------------------------------------------------------
diff --git a/lib/cordova-blackberry/bin/templates/project/www/res/screen/blackberry/splash-1280x768.png b/lib/cordova-blackberry/bin/templates/project/www/res/screen/blackberry/splash-1280x768.png
new file mode 100644
index 0000000..5f4bca9
Binary files /dev/null and b/lib/cordova-blackberry/bin/templates/project/www/res/screen/blackberry/splash-1280x768.png differ

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/88ad654c/lib/cordova-blackberry/bin/templates/project/www/res/screen/blackberry/splash-720x720.png
----------------------------------------------------------------------
diff --git a/lib/cordova-blackberry/bin/templates/project/www/res/screen/blackberry/splash-720x720.png b/lib/cordova-blackberry/bin/templates/project/www/res/screen/blackberry/splash-720x720.png
new file mode 100644
index 0000000..fe1756f
Binary files /dev/null and b/lib/cordova-blackberry/bin/templates/project/www/res/screen/blackberry/splash-720x720.png differ

http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/88ad654c/lib/cordova-blackberry/bin/templates/project/www/res/screen/blackberry/splash-768x1280.png
----------------------------------------------------------------------
diff --git a/lib/cordova-blackberry/bin/templates/project/www/res/screen/blackberry/splash-768x1280.png b/lib/cordova-blackberry/bin/templates/project/www/res/screen/blackberry/splash-768x1280.png
new file mode 100644
index 0000000..0fb9c1b
Binary files /dev/null and b/lib/cordova-blackberry/bin/templates/project/www/res/screen/blackberry/splash-768x1280.png differ