Eclipse Source Builds (Source from CVS)

Table of Contents

  1. What is an Eclipse source build?
  2. Getting the source
  3. Building Eclipse using Ant
  4. Building Eclipse using Eclipse
  5. Setting the bootclasspath
  6. Supported build platforms
  7. Known limitations

 

What is an Eclipse Source Build?

Eclipse source builds provide developers with an automated method for checking out source code and other required resources, compiling the Java code, generating javadoc, and finally, copying launcher files to the right location to launch Eclipse. The end result of a source build is a runnable Eclipse.

 

Getting the Source

A source build download contains shell and ant scripts that fetch and build a particular version of Eclipse. Although you can manually edit build.xml files in each feature and plug-in, they are typically generated by the Eclipse pde-build plug-in. As a result you will need to download a fresh source build zip file when major changes occur to Eclipse source, such as the addition or removal of plug-ins. The version of Eclipse a particular source build will create is embedded in the source build zip file name. For example, eclipse-sourceBuild-2.0.zip builds Eclipse version 2.0

To run the scripts, see instructions below on building Eclipse using ant or building Eclipse using Eclipse.

 

Building Eclipse using Ant and a JDK

Description

Produces an Eclipse SDK using the Java compiler you have installed.

System Requirements

  1. Ant 1.4 or higher
  2. JDK 1.3
  3. CVS 1.10 or higher
  4. 300 meg free disk space
  5. Source build zip from eclipse.org

Initial Setup

Install Ant, a JDK, and a CVS client, as per each program's instructions. Minimally you will need the following environment variables set.
  1. Add the Ant bin directory, and the CVS executable to your path.
  2. Set the JAVA_HOME environment variable to the root of your JDK installation.
  3. Set the ANT_HOME environment variable to the root of your Ant installation.
  4. (Windows 98) Set the HOME environment variable to c:
  5. (Windows 98) Increase the default environment space as specified here.

Run the Build

  1. Extract the eclipse-sourceBuild-*.zip to an empty directory.
  2. cd to the directory.
  3. Execute build -os <osType> -ws <windowSystemType> [-install <install>] [-bc <bootclasspath>] [-target <target>]
  4.  

      Parameter Name Description
      osType Target operating system (See supported types).
      windowSystemType Target windowing system (See supported types).
      install (optional) Directory where Eclipse will be built and installed. Default is the current directory.
      bootclasspath (optional) The full path to the rt.jar to compile against. The rt.jar file is part of any JDK or JRE. Typically this parameter is only specified if you are cross compiling Eclipse. The default is the rt.jar on your path.
      target (optional)

      The Ant target from build.xml to execute. The default target is run and performs a complete fetch, build, javadoc build and install. Other valid targets are:

      • fetchAll
      • compile (compiles Java code and generates javadoc)
      • buildDoc (creates doc.zip files in *.doc.isv and *.doc.user plug-ins)
      • install

     

    1. (optional) To update source from dev.eclipse.org, edit the relevant fetch_*.xml scripts. Change the tag attribute values to fetch the desired CVS tag or branch of the project..

      For example to update org.eclipse.pde source with the contents of HEAD set the tag attribute as follows:

      <cvs cvsRoot=":pserver:anonymous@dev.eclipse.org:/home/eclipse" dest="${install}/plugins" package="org.eclipse.pde" tag="HEAD" quiet="${quiet}"/>

      To update org.eclipse.pde source with the contents in the tag v20020618 set the tag attribute as follows:

      <cvs cvsRoot=":pserver:anonymous@dev.eclipse.org:/home/eclipse" dest="${install}/plugins" package="org.eclipse.pde" tag="v20020618" quiet="${quiet}"/>

      Note that since the build currently does a checkout and not an update files containing local changes will not be changed. Your local changes will be preserved but will not be merged with incoming changes. You will also not be able to commit local changes from the source build checked out files since they are all checked out as the anonymous user.

Building Eclipse using Eclipse

Description

Produces an Eclipse SDK compiled with the Eclipse Java compiler and built in Ant support.

System Requirements

  1. CVS 1.10 or higher.
  2. Eclipse build 2.1M5 or later installed and running. i.e. installed with a JDK or JRE (version 1.3 required).
  3. A source build zip file from eclipse.org
  4. JDK 1.3 or higher (optional - used for building javadoc. A JRE will not include the javadoc tool)
  5. 300 meg free disk space

Initial Setup

Install Eclipse, JDK (if you wish to generate javadoc), and a CVS client, as per each program's instructions. Minimally you will need the CVS executable on your path. On Windows 98, the HOME environment variable should be set to c:.

Run the Build

  1. Extract eclipse-sourceBuild-*Zip to an empty directory.
  2. Start Eclipse.
  3. Choose File->New->Project
  4. Choose Simple Project, click Next.
  5. Enter a project name.
  6. Under Project contents, deselect Use default, and set the contents to the eclipse-sourceBuild installation directory. Click Finish.
  7. Select build.xml and select the "Run Ant" context menu item.
  8. Set the following Ant properties:

os=<osType>
ws=<windowingSystemType>
install=<install>
bootclasspath=<bootclasspath>

Where:

      Parameter Name Description
      osType Target operating system (See supported types).
      windowSystemType Target windowing system (See supported types).
      install (optional) Directory where Eclipse will be built and installed. Default is the current directory.
      bootclasspath (optional) The full path to the rt.jar to compile against. The rt.jar file is part of any JDK or JRE. Typically this parameter is only specified if you are cross compiling Eclipse. The default is the rt.jar on your path.

     

    For example:

    os=win32
    ws=win32
    install=c:\sourcebuild\foo

  1. Deselect"Show execution log in console".
  2. Click "Finish".
  3. (Optional) To update source from dev.eclipse.org, edit the relevant fetch_*xml scripts. Change the tag attribute values to fetch the desired CVS tag or branch of the project..

    For example to update org.eclipse.pde source with the contents of HEAD set the tag attribute as follows:

    <cvs cvsRoot=":pserver:anonymous@dev.eclipse.org:/home/eclipse" dest="${install}/plugins" package="org.eclipse.pde" tag="HEAD" quiet="${quiet}"/>

    To update org.eclipse.pde source with the contents in the tag v20020618 set the tag attribute as follows:

    <cvs cvsRoot=":pserver:anonymous@dev.eclipse.org:/home/eclipse" dest="${install}/plugins" package="org.eclipse.pde" tag="v20020618" quiet="${quiet}"/>

    Note that since the build currently does a checkout and not an update files containing local changes will not be changed. Your local changes will be preserved but will not be merged with incoming changes. You will also not be able to commit local changes from the source build checked out files since they are all checked out as the anonymous user.

  4. (Optional) To recompile the source, deselect the "run" target and select the "compile" from the list of available targets. Other valid targets you may wish to run are:

Supported Platforms

Eclipse can be built on any of the following platforms. With some limitations any platform can be used to build Eclipse for any or all supported platforms.

Operating System (OS) Windowing System (WS)
win32 win32
linux motif
linux gtk
solaris motif
aix

motif

hpux motif
qnx photon

 

Known Limitations

  1. Building unix flavours of Eclipse on Windows will result in incorrect file permissions. The *.so, *.sl, and Eclipse executable files will not have execute permissions. In addition, linux-motif and linux-gtk builds will not have soft links to libXm.so.2.1 in the installation root directory. In these cases you would have to write an install or post install script to set permissions properly. (UNIX builds built on UNIX systems will set sufficient permissions and make the appropriate soft links).
  2. Only Java source code is compiled. *.dll, *so, *sl and Eclipse executables are all checked out of dev.eclipse.org prebuilt in this build process.