Skip to content

Latest commit

 

History

History
87 lines (45 loc) · 5.99 KB

target_platforms_dependency_mirrors.adoc

File metadata and controls

87 lines (45 loc) · 5.99 KB

How to create a new target platform dependency mirror

Why would you need to do this?

The process for updating target platforms is as follows:

  1. find an update site from which the dependency can be resolved (often from download.eclipse.org). You can either simply use a web browser, or the p2 browser, to find the plugins/features you need

  2. mirror that update site into a subfolder of http://downloads.jboss.org/jbosstools/updates/requirements/

  3. point your .target file at that mirror

  4. resolve target platform site from .target file (see target platforms updates - Update versions of IUs in the .target files)

Generally, your release engineering team handles the first two steps. But, it’s not hard to find and produce the mirror yourself, in order to then produce a locally modified .target file with the correctly updated versions of your chosen IUs. This document will explain how to produce such a mirror.

If no current mirror exists…​

If no mirror yet exists for the version of features/plugins you’d like to add to the target platform, look in updates/requirements/ for your requirement’s folder, or perhaps the name of a project that includes your requirement. Often, you can find things in Orbit or in the current simulataneous release train’s folder:

In the github folder, there should also be a build.xml file showing the most recent URL and version mirrored.

Similarly, if you browse to the equivalent folder on download.jboss.org, you will see one or more versioned subfolders. These are the actual mirrors (not just the scripts), produced from the build.xml script then pushed to the server.

So here’s what you do:

  1. Change the build.xml file, then run it locally to verify it works. See details below.

  2. Submit a pull request to update the source URL and/or version, as applicable, to the jbosstools-download.jboss.org repository.

  3. Attach the PR to the JIRA requesting the target platform update.

If no mirror exists at all…​

If you can’t find an existing mirror with your requirement - even an older version - you may need to create a whole new build.xml script.

Or, perhaps you found your requirement, but you need something NEWER than the lastest available in the latest Eclipse simrel. This happened for the CDT launchbar feature.

Or, maybe SOME of your requirements are in the latest Eclipse simrel, but you need something else as well. This applies to projects like Web Tools, as the latest Eclipse simrel only includes a subset of the WTP plugins/features.

So here’s what you do:

  1. Create a build.xml file, then run it locally to verify it works. See details below.

  2. Submit a pull request to add your new build.xml file to the jbosstools-download.jboss.org repository.

  3. Attach that PR to the JIRA requesting the target platform update.

Mirroring with Jenkins

Your build.xml script can be run via this Jenkins job (if you have VPN access).

You can even pass in alternate values for SOURCE_URL and VERSION, which are the two most likely things you’d be changing in a pull request above. This allows you to re-use an existing build.xml script without having to work through the pull request process above.

How does the build.xml script work?

It’s a simple script that uses the <p2.mirror> ant task, invoked by Eclipse’s AntRunner, to produce a mirror of one or more update sites.

It can also:

Some build.xml scripts call a generic mirror script, to make them even simpler.

For example, here’s how we mirror Thym.

Run the script

To run a build.xml script, you need Eclipse. Then do this:

    java -cp /path/to/eclipse/plugins/org.eclipse.equinox.launcher_*.jar \
      org.eclipse.equinox.launcher.Main -consoleLog -nosplash -data /tmp \
      -application org.eclipse.ant.core.antRunner -f /path/to/your/build.xml