Here are the steps needed to build a release of an application. Some of these may vary for apps which build for a limited number of platforms.
Install each JDE and net_rim_api.jar
Download and install each JDE to your /tools/rim directory. Once it is installed use the Maven command mvn install:install-file -DgroupId=net.rim -DartifactId=rim-api -Dversion=5.0.0 -Dpackaging=jar -Dfile=/tools/rim/jde-5.0.0/net_rim_api.jar to install the SDK lib to your Maven directory. Then add the jde to your metovaMobilePlugin.xml. Each platform will have its own xml section in your config that looks like:
<platformVersion id="rim-4.3.0" type="rim"> <dir>/tools/rim/jde-4.3.0</dir> <classifiers> <classifier>CLDC-1.1</classifier> <classifier>MIDP-2.0</classifier> <classifier>RIM-4.3.0</classifier> </classifiers> <dependencies> <dependency> <groupId>net.rim</groupId> <artifactId>rim-api</artifactId> <version>4.3.0</version> </dependency> </dependencies> </platformVersion>
Note that classifier always matches the base version (4.3.0, 5.0.0) and does not include a build number.
Our current JDEs as of 4/13/2010 are:
| JDE | Directory | version | notes |
|---|---|---|---|
| 4.2.1 | /tools/rim/jde-4.2.1 | 4.2.1 | |
| 4.3.0 | /tools/rim/jde-4.3.0 | 4.3.0 | |
| 4.6.0 | /tools/rim/jde-4.6.0 | 4.6.0-20080827 | Represents the second Gold release. |
| 4.7.0 | /tools/rim/jde-4.7.0 | 4.7.0.39 | Represents the Gold release |
| 5.0.0 | /tools/rim/jde-5.0.0-beta-5 | 5.0.0.14 | A newer version of the JDE is available but it has not been tested yet. |
Configure the signing tool
If each JDE directory has the signature keys from RIM installed the application will be signed automatically when the build tool is in release mode. Directions for setting up these keys are found on RIM's website![]()
Enable release mode
Change the <mode> in your metovaMobilePlugin.xml file to "release-all". This will tell the file to iterate through each platform and create a release binary. Make sure you have <stagingDir> configured to point to an existing directory on your machine because it will output the results to this directory.
Run Maven
From the command line run mvn clean install to start a signed build. This will create the binaries of the application in the configured stagingDir.
To perform a tagged release automatically run the Maven command:
mvn --batch-mode clean release:prepare release:perform -DpreparationGoals=clean -Dskip.simulator.install=true -DuseReleaseProfile=false
This will use the maven-release-plugin to tag the build and automatically increment the version. Because Metova's automated build uploads to our build server you may need to change your project's pom so that the build doesn't automatically try to upload. To do this make sure the maven-release-plugin is configured to only use the release goal of install.
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-release-plugin</artifactId> <configuration> <releaseProfiles>deploy-application,release</releaseProfiles> <goals>install</goals> </configuration> </plugin>
