Several resources are required on a build computer for
a mobile application build script to run.
Workspace resources
The build computer must
have the mobile application projects and source code to be built,
and the Ant build scripts that direct the build. Managing your Worklight
project source code and your build scripts in a Rational Team Concert™ repository
workspace offers two immediate benefits:
- Source control. Changes to source code and build scripts can be
requested, developed, reviewed, approved, delivered, tracked and otherwise
managed according to the needs of your development project. The build
scripts are living files, just like the source code.
- Build automation. The Jazz™ Build
Engine automatically loads the workspace to be built onto the build
computer early in the processing of a build request.
Create and
use a dedicated “build workspace” for each definition. Do not point
a build definition directly to a stream or to a workspace meant for
another purpose (for example, a user’s personal workspace, or a team
integration workspace). For more information, see the “best practices”
topic on the CLM v4.0 information center .
Static resources
There are other resources
that must also be present on the build computer. Unlike the mobile
application build scripts and source code, do not include these resources
in the workspace. Instead, the build administrator must manually install
these resources on each build computer.
Tip: Install these
resources into the same relative locations on all build computers.
The relative locations are specified in build definitions in Rational Team Concert.
If the resources are installed into different locations on different
build computers, then a build definition works on one build computer
likely fails on another build computer.
Static resources
on the build computer are:
- Oracle JDK 6. Use this JDK for running the Ant scripts and Android
SDK tools that are run by the scripts. Also, install a JDK, not a
JRE, because some Ant tasks require Java™ tools
available in the JDK but not the JRE.
Note: Avoid Oracle Java 7 because there is an incompatibility between
it and the Rational
Team Concert Build System Toolkit client.
- Apache Ant. Version 1.8.3 or later is the minimum version of Apache
Ant that is required to run the Ant scripts.
- JAR library files that provide and enable the Worklight Ant tasks
that are used in the build scripts:
- worklight-ant.jar
In the “WorklightServer”
folder of the IBM® Worklight
Server installation
- applicationcenterdeploytool.jar
In the
“ApplicationCenter” folder of the IBM Worklight
Server installation.
- json4j.jar
in the “ApplicationCenter”
folder of the IBM Worklight
Server installation.
Tip: An alternative approach to pre-loading the JAR
library files on the build computers is to include them in your build
workspace. This approach has the advantage of enabling your build
definitions and engines to easily build with different versions of
Worklight, and is a key tenant of generating reproducible builds.
A disadvantage is that JAR libraries can be large (for example, worklight-ant.jar
at approximately 27 MB) and might affect the performance of builds
and build computers. If you share a build system and build computers
across multiple teams, follow this alternative approach for managing
the JAR library files.
- (Optional) The Dojo toolkit
You might consider installing the
Dojo toolkit on each build computer, depending on the answers to the
following questions:
- Will any of the mobile applications under development use Dojo?
If not, then it is not necessary to install the Dojo toolkit on the
build computer.
- Will all of the mobile application projects either include the
Dojo toolkit or access it over a Content Delivery Network? If so,
then it is not necessary to install the Dojo toolkit on the build
computer.
- How will the mobile applications access the Dojo toolkit? If the
Dojo toolkit is included in the workspace project along with the application
source code, or if the Dojo toolkit is on a Content Delivery Network,
then it is not necessary to install the Dojo toolkit on the build
computer.
Tip: Install these resources into the same relative
locations on all build computers. The relative locations are specified
in build definitions in Rational
Team Concert. If the resources are installed into different locations
on different build computers, then a build definition which works
on one build computer will likely fail on another build computer.