Now Particularly Misnamed
Unleash awesomeness. Private packages, team management tools, and powerful integrations. Get started with npm Orgs »


1.2.0 • Public • Published


cordova-publish-android Build Status

A simple Node tool to build and publish apk file. It runs cordova build command, rename .apk file with its project name and version. In the end the apk file is published on a binary repository (for example Artifactory) with maven deploy file goal (apache-maven-3.5.0).


  • Added maven wrapper 1.2.0
August 21,2018 Release 1.2.0 available from npm
  • First Release 1.1.0
August 13,2017 Release 1.1.0 available from npm



You must have installed Node.js and Java (whatever version) with its system variable (JAVA_HOME).

After these prerequisites, you can download the github repo and run:

npm install


npm install -g

N.B for the linux machine probably you have to run "sudo npm install -g"

The second globally installs a shell command in your machine.

Besides, you can install automatically with npm commands in your project (locally):

npm install cordova-publish-android

or globally

npm install cordova-publish-android -g

N.B for the linux machine probably you have to run "sudo npm install cordova-publish-android -g"


If you have cloned this repo and executed "npm install", you have to copy the publish.js file and the node_modules folder under your cordova root folder (where there is the config.xml file and the platforms folder).

Previous the android platform must be added in your cordova project with the cordova cli command "cordova platform add android". Remember that to create a cordova project you have to install before the cordova cli with the "npm i cordova -g".

After run this:

node publish <url> <repositoryId>

Where the "url" and the "repositoryId" are respectively your binary repo (for example Artifactory) url and the id associated to your server credential of the maven settings.xml.

The credentials are mandatory if the plublishing on Artifactory is permissed only with an authentification. The settings.xml must be created in your user home under a folder named .m2.

The file structure is the following:

        <settings xmlns="" xmlns:xsi="" xsi:schemaLocation="">

If you have executed "npm install -g", you directly can run in your cordova root project this command:

cpa publish <url> <repositoryId>

The parameters are the same of the previous option execution. You can have more information about maven deploy:file goal and its parameters on:


To learn about Cordova (and cordova cli) visit its website: To information about the creation of a maven settings and its .m2 folder:


npm i cordova-publish-android

Downloadsweekly downloads





MIT license




last publish


  • avatar
Report a vulnerability