phonegap-maven-plugin

A plugin for building a phonegap project using maven. This is done locally on your pc. You need to have phonegap installed in your computer to use this plugin.

License

License

Categories

Categories

Maven Build Tools
GroupId

GroupId

com.byclosure.maven.plugins
ArtifactId

ArtifactId

phonegap-maven-plugin
Last Version

Last Version

0.0.2
Release Date

Release Date

Type

Type

maven-plugin
Description

Description

phonegap-maven-plugin
A plugin for building a phonegap project using maven. This is done locally on your pc. You need to have phonegap installed in your computer to use this plugin.
Project URL

Project URL

https://github.com/Byclosure/phonegap-maven-plugin
Source Code Management

Source Code Management

https://github.com/Byclosure/phonegap-maven-plugin

Download phonegap-maven-plugin

How to add to project

<plugin>
    <groupId>com.byclosure.maven.plugins</groupId>
    <artifactId>phonegap-maven-plugin</artifactId>
    <version>0.0.2</version>
</plugin>

Dependencies

compile (4)

Group / Artifact Type Version
org.apache.maven : maven-plugin-api jar 3.1.1
org.eclipse.aether : aether-api jar 1.0.2.v20150114
org.eclipse.aether : aether-util jar 1.0.2.v20150114
org.apache.commons : commons-exec jar 1.3

Project Modules

There are no modules declared in this project.

##PHONEGAP MAVEN PLUGIN

A plugin for building a phonegap project using maven. The build is done locally on your pc.

You need to have phonegap installed in your computer to use this plugin and your project must generate html.

This plugin can be used with:

##How to use

Add the plugin dependency to your pom.xml

<dependency>
  <groupId>com.byclosure.maven.plugins</groupId>
  <artifactId>phonegap-maven-plugin</artifactId>
  <version>0.0.1</version>
</dependency>

Create the phonegap project dir (by default it will create in target/phonegap)

mvn phonegap:create

Add support for a platform (by default it will add android platform)

mvn phonegap:platform-add

Add support for plugin (i.g. adding splashscreen plugin)

mvn phonegap:plugin-add -Dphonegap.plugin="org.apache.cordova.splashscreen"

Copy the generated html to the phonegap www folder (any plugin that copies files can be used)

<plugin>
      <artifactId>maven-antrun-plugin</artifactId>
      <version>1.4</version>
      <executions>
        <execution>
          <id>copy</id>
          <phase>compile</phase>
          <configuration>
            <tasks>
              <copy file="target/compiled_html" tofile="target/phonegap/www"/>
            </tasks>
          </configuration>
          <goals>
            <goal>run</goal>
          </goals>
        </execution>
      </executions>
    </plugin>

Execute build

mvn phonegap:build

Parameters for goals

To see the available goals

mvn help:describe -Dplugin=com.byclosure.maven.plugins:phonegap-maven-plugin

To see the parameters available for a goal (for other goals replace phonegap:create with goal)

mvn help:describe -Dcmd=phonegap:create -Ddetail

Additional Links

Contributions

We welcome all the help we can get!

Versions

Version
0.0.2
0.0.1