Background information
RCP Introduction
RCP (Rich-client Platform), an Open-source technology framework based on Eclipse, provides developers with a rich set of components to build an application that avoids heavy development tasks from scratch, enabling rapid application development. Developers can get rid of the boring interface layout and other development work by putting more effort into business component development. At the same time, RCP can make it easier for developers who have never had plug-in development to get started and understand the concept of plug-in development.
ANT Introduction
ANT is a project management tool written in the Java language. It can manage and deploy the project by building the XML configuration file.
The question of the proposed
Using the characteristics of RCP can shorten the cycle of software development and improve the efficiency of development, however, in actual development, the build environment of the production product and the development environment used by the developers are often not on the same server or machine. For an operating system with a visual interface, we might be able to generate the final product through an Interface wizard. But how do you build a product for a compiler environment that is not a visual interface? Combined with Ant, this can be a good solution to this problem. Here is a detailed description.
Environmental preparedness
Preparing Your ANT Environment
Download ANT installation package
Download Ant packages at the Apache website and related links in resources.
Configure Environment variables
Add ant_home=c:\test\ant\apache-ant-1.8.4 to the environment variable.
Add the path to the%ant_home%/bin.
Check ANT Installation
For example, in Windows, enter ant-version in the console. If the output is the current ant version and there is no error, the ANT environment variable configuration is ready.
Preparing Eclipse
Download an Eclipse SDK development tool and the corresponding Eclipse Delta pack. The Delta Pack contains a number of jar packages that are dependent on the platform packaging. Specific links can refer to the links in resources.
Actual case
With the above introduction, we have a preliminary understanding of RCP and Ant. An example of how to deploy an RCP project with an Ant script is shown below.
Create an RCP project
Step One: Build a simple RCP project.
Select Plug-in Project Project.
Figure 1. Create a plug-in Project
Name the project named HELLORCP, then go to the next step and select the "Hello RCP" template as shown in the wizard page of the Select template:
Figure 2 Creating a project template