Skip to content

Byclosure/phonegap-maven-plugin

Repository files navigation

##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!

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages