Skip to content

Transform a war dependency to an application based on cordova.

License

Notifications You must be signed in to change notification settings

spirylics/web2app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

web2app

Web2app transforms a web application, from a war dependency to an application based on cordova.

Prerequisites

JDK8+, Maven3+ and SDKs of each platforms like android sdk or xcode.

Features

web2app is based on maven lifecycle to generate applications for each platforms taking care of boring business.

  • setup: Install node cordova locally - comfort test of new version and multiproject management

  • create: Make cordova project and add platforms and plugins required

  • import: Import usefull webapp resources from war dependency, configuration, inject cordova javascript and generate scaled pictures for each platforms

  • build: Build project

  • package: Sign archives if necessary and make a zip with all platforms

      mvn package -Dplatforms=android,ios,browser    
    

In more you can:

  • Generate a keystore at the beginning to release your application:

      mvn web2app:genkeystore
    
  • Run on an emulator

      mvn web2app:emulate -Dplatforms=android,ios
    
      mvn web2app:emulate -Dplatforms=android#nexus5,ios#iphone6
    
  • Run on a device

      mvn web2app:run -Dplatforms=android,ios
      
      mvn web2app:run -Dplatforms=android#12345,ios#12345
    

Configuration example (pom.xml)

    <properties>
        <app.group>${project.groupId}</app.group>
        <app.name>${project.artifactId}</app.name>
        <app.id>${app.group}.${app.name}</app.id>
        <app.version>${project.version}</app.version>
        <app.version.code>1</app.version.code>
        <app.description>${project.description}</app.description>
        <app.author.email>[email protected]</app.author.email>
        <app.author.site>${project.url}</app.author.site>
        <app.content>CarStore.html</app.content>
        <app.icon>icons/ic_launcher.png</app.icon>
        <app.splashscreen>${project.basedir}/splashscreen.png</app.splashscreen>
        <app.themeColor>0xF8F8F8</app.themeColor>
        <platforms>browser,android,ios</platforms>
        <build.type>release</build.type>
        <sign.keystore>${basedir}/app.keystore</sign.keystore>
        <sign.alias>${app.name}</sign.alias>
        <sign.keypass>azerty</sign.keypass>
        <sign.storepass>${sign.keypass}</sign.storepass>
        <version.node>v5.10.1</version.node>
        <version.npm>3.8.3</version.npm>
        <version.cordova>6.1.1</version.cordova>
    </properties>
    <build>
        <plugins>
            <plugin>
                <groupId>com.github.spirylics.web2app</groupId>
                <artifactId>web2app-maven-plugin</artifactId>
                <version>1.0-beta4</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>setup</goal>
                            <goal>create</goal>
                            <goal>import</goal>
                            <goal>build</goal>
                            <goal>package</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <plugins>
                        <plugin>https://github.com/robertklein/cordova-ios-security.git</plugin>
                        <plugin>cordova-plugin-device</plugin>
                        <plugin>cordova-plugin-splashscreen</plugin>
                        <plugin>cordova-plugin-statusbar</plugin>
                        <plugin>ionic-plugin-keyboard</plugin>
                        <plugin>cordova-plugin-inappbrowser</plugin>
                        <plugin>cordova-plugin-crosswalk-webview</plugin>
                        <plugin>cordova-plugin-geolocation</plugin>
                        <plugin>cordova-plugin-networkactivityindicator</plugin>
                        <plugin>cordova-plugin-network-information</plugin>
                    </plugins>
                    <dependency>
                        <groupId>com.gwtplatform</groupId>
                        <artifactId>gwtp-carstore</artifactId>
                        <version>1.2.1</version>
                        <type>war</type>
                    </dependency>
                </configuration>
            </plugin>
        </plugins>
    </build>

See web2app-maven-plugin-demo for full example.

About

Transform a war dependency to an application based on cordova.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages