ScopeThis document is a users guide to installing the Java software necessary to perform builds of VisualDCT project. The instructions include steps needed to set up Eclipse IDE, 3rd party software and explanation of how Ant build files are used. AudienceThe audience of this document are all developers wishing to build VisualDCT project. Table of Contents1. Introduction2. 3rd Party Software3. Eclipse installation4. Build Process4.1. Manual builds4.1.1. Configuring Eclipse4.1.2. Configuring Ant4.1.3. Writing Ant build file4.1.3.1. Versioning and file names4.1.3.2. Build Parameters4.1.3.3. Build Targets4.1.3.4. How to build a VisualDCT.jar (for external users)5. ConclusionReferencesDocument HistoryHow to Read This DocumentThis document's meta-information (authors, revision history, table of contents, ...) can be found above. What follows below is the body of the document. The body is composed of several sections, which may be further composed of subsections. Typographical styles are used to denote entities of different kinds. For a full list of entities and their respective typographic conventions, please refer to the Styles section of the XML Documentation document. When viewing the document in a non-printed form, it is possible to submit comments regarding a given section to the document's owner. This is achieved by clicking the mail icon next to the section title. For this to work, your mail must be configured to properly handle the mailto URLs. 1. IntroductionThis document is divided into three sections. The first section defines the locations of the 3rd party software, such as Sun runtime libraries, extension libraries etc. The second section describes the Eclipse (or Websphere) installation and setup. The third section describes the use of Ant build files, which are customarily distributed with the VisualDCT project. 2. 3rd Party SoftwareThird party software for Java is needed for two distinct purposes:
Apart from this division based on the use of the 3rd party software, it can also be divided into platform-independent and platform-specific. Libraries delivered in jar form together with their documentation and resources form the platform-independent software. Executables, such as run-time environments and stand-alone services are usually platform-dependent. The 3rd part software is located in VDCTROOT/3rdParty directory. All 3rd party software, discussed in this section, is then installed into 3rdParty subdirectory in the following manner:
Platform name is defined by the returned value of uname POSIX command.
Under each directory enumerated above, each 3rd party product is installed into its own directory.
The name of the directory is a lower-case product name, followed by a '-' character, followed by a version specification in which dot '.' servers as major / minor separator (e.g. mmmysql-2.0.11). Every 3rd party product has to have the following directory structure (created if necessary):
3rd party directory structure is used in build files and batches for running programs. 3. Eclipse installationThis section lists the steps needed to install Eclipse product and get it working with VisualDCT project. This section presupposes that Java Development Kit has already been installed.
4. Build ProcessVisualDCT project is built with Ant build tool. Ant tool is used because it is easier to manage than makefiles and it is customized for use with Java (classpath handling, additional build tasks specified in Java, etc). Ant works by executing an Ant build file in the form of Ant conformant XML. During the development process VisualDCT is build automatically by Eclipse without Ant, this way is easier and faster. All other tasks such as test process, integration builds and releases should be done with Ant. 4.1. Manual builds4.1.1. Configuring EclipseThis section lists the steps needed to configure Eclipse product to build internal VisualDCT-Common project.
[Matej Sekoranja] This is not necessary, since all these kind of settings are stored in .classpath file. [Matej Sekoranja] In Eclipse - - - add external task jars in classpath.
[Matej Sekoranja]
Ant may give the following error message: 4.1.2. Configuring AntThis section lists the steps needed to install Ant product and get it working with VisualDCT project. This section presupposes that Java Development Kit has already been installed.
VisualDCT Ant build scripts need the following external task libraries: And some optional, necessary to do VisualDCT integration builds and releases (needed only by Cosylab to generate VisualDCT WWW pages): All necessary libraries are located in 3rdparty directory. 4.1.3. Writing Ant build fileIn order to build the VisualDCT project manually, the developer responsible for the project must write the build.xml file and place it in the root directory of the project. This file must:
For more insight, a sample build.xml file is provided below.
Here we provide a brief discussion of the sample build file:
4.1.3.1. Versioning and file namesVisualDCT Ant build script VDCTBuild.xml has auto-versioning capability. Script searches for the past builds thourch the directory structure and returns build version. If build or release target is used, it generates a new version, otherwise the latest is used. This feature can be also overriden by setting build.version property as described in Build Parameters section.
Version is composed of major, minor and build version. All three components are numbers and are seperated by a dot '.', e.g. 2.0.1232.
Also filenames follows the <project name>-<type>-<version>.<ext> convention, where type can be src, doc, dist,
e.g. VisualDCT-doc-2.0.1232.zip
4.1.3.2. Build ParametersIn order for the build process to work correctly, two parameters must be provided to the JVM or ANT using the -D parameter passing mechanism.
For example, if target directory is ~/dist and version 2.0.1232, the parameters for the JVM look like this: -Dbuild.output=~/dist -Dbuild.version=2.0.1232 Parameters can be also provided by hardcoding it into build.xml file simply by adding lines:
4.1.3.3. Build TargetsVisualDCT Ant build script VDCTBuild.xml has defined the following targets:
[Matej Sekoranja] * - to be used only by Cosylab.
4.1.3.4. How to build a VisualDCT.jar (for external users)
Simply go to the VisualDCT source root directory and type ant. 5. ConclusionThis document will probably change in the future. When known, the explicit WWW locations will be included. Document History
References
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||