Installing and using Mobile Suite : Using webMethods Mobile Designer : Coding a Mobile Application : Creating and Using Code Libraries : Building a Library that You Want to Reference in Other Projects
Building a Library that You Want to Reference in Other Projects
For an example of a sample library project, see the Library JSON (_LibraryJSON_) sample project, which you can find in the following directory:
Mobile Designer_directory /Samples
In a library project, the build.xml file references a libtargets.xml file rather than a targets.xml file. Additionally, to compile, use the +Library-Build Ant task rather than the +Multi-Build Ant target.
Important:  
Be sure to precompile your library for each target platform with which you want to use the library.
To successfully activate an application project that references a library project, you must build the J2ME libraries in the referenced library project first.
To build a library
1. Start a new project, or you can import and clone the provided Library JSON sample project. For more information, see Creating a New Mobile Application Project.
Note:  
To clone the project, use the Clone-Project Ant target.
2. Use the +Library-Build Ant task to compile the codebase.
a. In the Project Explorer view, expand the project, and drag the build.xml file to the Ant view.
b. In the Ant view, double-click +Library-Build to launch the Library Build dialog.
c. In the Library Build dialog, select the platforms for which you want to build the library.
The +Library-Build Ant task compiles the library code into the libraries for the chosen platforms and places the result in a library in the Builds folder.
Copyright © 2007-2016 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback