JDK Build Process
By xiomara on Mar 17, 2009
The goal of Java Release Engineering is a reliable, reproducible and consistent build process.
If you are not familiar with Mercurial repositories and forests, please see understanding mercurial.
The following is a representation of the build process for JDK7:
- Remember: There is only one set of source for the OpenJDK and the regular JDK!
- Integration areas: Each team has its own integration area: 2d, awt, hotspot, tl, jaxws, build, etc. An integration area is a forest which contains six repositories: corba, hotspot, jaxp, jaxws, jdk, langtools. Together, these six repositories contain almost the entire JDK source. This allows a team to make all the changes necessary for its features regardless of where in the source they occur.
- Each integration area is associated with a gate. A gate is a forest which is simply a copy of the integration area. A team pushes changes into the gate for their area, and the gate synchronizes with the area automatically. Each area has a gatekeeper who builds it to ensure the team's code does not break the overall JDK build.
- Master: There is a master forest where the "official" source resides. You can see the list of JDK7 forests here - the master is jdk7/jdk7 and its child repositories
are jdk7/jdk7/corba, jdk7/jdk7/hotspot, etc. The master's gate is jdk7/jdk7-gate and its child
repositories are jdk7/jdk7-gate/corba, jdk7/jdk7-gate/hotspot, etc.
- You can jump to a forest directly by appending its name to http://hg.openjdk.java.net/, e.g. the master jdk7/jdk7 is located at http://hg.openjdk.java.net/jdk7/jdk7.
- The source of the master is also available for convenience in a ZIP file at this location.
- The gatekeeper of an integration area is responsible for pushing the area's changes to the master's gate during the area's scheduled integration slot. The master's gate synchronizes with the master automatically, just as the integration areas synchronize with their gates automatically.
- The following diagram shows the master and gate for the 'open' part of the JDK. The 'closed' master and gate are not shown - they contain a very minor portion of the JDK source which is still encumbered.
- Release Engineering pulls build changes on a nightly or daily basis from the open and closed masters. Nightly builds are run for eight different platforms as shown below in the blue boxes.
- The promotion process happens weekly on a schedule. Promotion follows the same steps as the nightly build process except for the grayed out boxes above. It additionally distributes the built bits to QA teams in Sun to run acceptance testing. After QA has accepted the binaries, they are posted on the web for the JDK7 and OpenJDK7.
- To summarize, the overall build process is shown below:
Many thanks to Alex Buckley for his help with this blog entry!