Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Ant/How to add new Ant versions"

< Ant
(Creating the Orbit bundle)
(Creating the Orbit bundle)
Line 28: Line 28:
  
 
[[Image:org.apache.ant-bundle-shape.png|The Orbit bundle shape for Ant 1.9.2]]
 
[[Image:org.apache.ant-bundle-shape.png|The Orbit bundle shape for Ant 1.9.2]]
 +
 +
The important parts to note in the bundle are:
 +
*''about_files'' - contain all of the license files directly from Apache
 +
*''bin'' - contains all of the script files from the [http://ant.apache.org/bindownload.cgi binary distribution] of Apache Ant
 +
*''etc'' - contains all of the styles sheets for Ant tasks
 +
*''lib'' - contains all of the jar files from the [http://ant.apache.org/bindownload.cgi binary distribution] of Apache Ant
 +
*''source-bundle'' - contains the Orbit-formatted source bundle, whose content come from the [http://ant.apache.org/srcdownload.cgi source distribution] of Apache Ant (more on this later)
 +
 +
The remainder of the files / folders are standard Eclipse bundle files which don't require special mention. Any of them that requires editing will be mentioned in the following sections.
 +
 +
== Grab the new Apache Ant version ==
 +
 +
The first step to creating our new orbit bundle is grabbing the binary and source distributions of Apache Ant.
 +
 +
They can be found on their respective download pages:
 +
* [http://ant.apache.org/bindownload.cgi binary distributions]
 +
* [http://ant.apache.org/srcdownload.cgi source distributions]
 +
 +
Once you download the two version, extract them some where convenient. Also take note the Apache download page mentions you might need special steps to extract the distributions due to really long file names.
 +
 +
== Create the workspace bundle ==
 +
With the latest version of Apache Ant acquired and an old version of the Ant bundle to compare to, lets create the new version in our workspace. A note here: it is a good idea to have no other bundles open in you workspace while you are working on Apache Ant. The reason for this is that Apache Ant is a low-level bundle and bringing it into your workspace / editing it seems to cause confusion in your target platform. So best to just keep all you other bundles closed while you create the new version.
 +
 +
Lets go:
 +
#Create the <code>org.apache.ant</code> bundle
 +
#Fill in the <code>MANIFEST.MF</code> information as required. 'Id' is org.apache.ant, 'version' is 1.9.3_qualifier (for example), 'name' is Apache Ant and 'provider' is Eclipse Orbit. Make sure to also externalize these values for translation (you can use the PDE wizard for this).
 +
#Add a bundle dependency on <code>org.eclipse.osgi</code> in the <code>MANIFEST.MF</code> (do not include version constraints on it)
 +
#Add a BREE of <code>J2SE-1.5</code> in the <code>MANIFEST.MF</code> and click the <code>update classpath settings</code> link.
 +
#Copy the <code>/about.html</code> file from the old version to the new version. Open it and change the date to the current date.
 +
#Copy all of the files from the <code>.settings</code> folder of the old version into the <code>.settings</code> folder of the new version
 +
#Create <code>/about_files</code>, <code>/bin</code>, <code>/etc</code>, <code>/lib</code>, <code>/source-bundle</code> and <code>/source-bundle/libsrc</code>folders
 +
#Copy the <code>/MANIFEST.MF/eclipse.inf</code> file from the old version to the new version
 +
 +
Thats it! At this point we have the complete bundle shape, all that remains is to add the updated Ant libraries / files.
  
 
= Creating the CQ =  
 
= Creating the CQ =  
  
 
= Testing and Test builds =
 
= Testing and Test builds =

Revision as of 15:01, 2 January 2014

Platform Ant
Website
Download
Community
Mailing ListForumsIRCmattermost
Issues
OpenHelp WantedBug Day
Contribute
Browse Source

This wiki discusses the steps to add a new version of Apache Ant to the Eclipse platform. The intended audience is committers, but everyone is free to contribute versions.

How it works

Eclipse consumes Apache Ant from Orbit as a 'normal' Eclipse bundle rather than try to integrate Apache Ant as-is. Below is a quick overview of the process, with the following sections providing more details.

A quick overview of the process:

  • Ant is taken from Apache site and converted to the Orbit bundle format.
  • A CQ is opened to get legal approval to use the new version
  • Once approved, the new version is added to Orbit
  • Smokes testing and test builds are done
  • Assuming no problems - the platform is updated

Creating the Orbit bundle

The first step is to create the new Orbit bundle that can be used in your workspace (or installed in your host) to test with. This section assumes you are familiar with the terminology of Eclipse bundles, using the PDE tools, testing / running JUnit tests and have read the relevant how-tos from the Orbit wiki about adding / configuring bundles.

The bundle

The best way to see the expected shape of the Ant bundle is simply to look at an older (or current) version used by Eclipse. You can grab an older version from the CVS repository, but you will have to rename it in your workspace (or its name will collide with the new version you are trying to create). At the time of this writing the version used in Eclipse is 1.9.2, so you will want to check out the 1_9_2 branch of Ant from orbit.

Once in your workspace, the bundle will look like the following:

The Orbit bundle shape for Ant 1.9.2

The important parts to note in the bundle are:

  • about_files - contain all of the license files directly from Apache
  • bin - contains all of the script files from the binary distribution of Apache Ant
  • etc - contains all of the styles sheets for Ant tasks
  • lib - contains all of the jar files from the binary distribution of Apache Ant
  • source-bundle - contains the Orbit-formatted source bundle, whose content come from the source distribution of Apache Ant (more on this later)

The remainder of the files / folders are standard Eclipse bundle files which don't require special mention. Any of them that requires editing will be mentioned in the following sections.

Grab the new Apache Ant version

The first step to creating our new orbit bundle is grabbing the binary and source distributions of Apache Ant.

They can be found on their respective download pages:

Once you download the two version, extract them some where convenient. Also take note the Apache download page mentions you might need special steps to extract the distributions due to really long file names.

Create the workspace bundle

With the latest version of Apache Ant acquired and an old version of the Ant bundle to compare to, lets create the new version in our workspace. A note here: it is a good idea to have no other bundles open in you workspace while you are working on Apache Ant. The reason for this is that Apache Ant is a low-level bundle and bringing it into your workspace / editing it seems to cause confusion in your target platform. So best to just keep all you other bundles closed while you create the new version.

Lets go:

  1. Create the org.apache.ant bundle
  2. Fill in the MANIFEST.MF information as required. 'Id' is org.apache.ant, 'version' is 1.9.3_qualifier (for example), 'name' is Apache Ant and 'provider' is Eclipse Orbit. Make sure to also externalize these values for translation (you can use the PDE wizard for this).
  3. Add a bundle dependency on org.eclipse.osgi in the MANIFEST.MF (do not include version constraints on it)
  4. Add a BREE of J2SE-1.5 in the MANIFEST.MF and click the update classpath settings link.
  5. Copy the /about.html file from the old version to the new version. Open it and change the date to the current date.
  6. Copy all of the files from the .settings folder of the old version into the .settings folder of the new version
  7. Create /about_files, /bin, /etc, /lib, /source-bundle and /source-bundle/libsrcfolders
  8. Copy the /MANIFEST.MF/eclipse.inf file from the old version to the new version

Thats it! At this point we have the complete bundle shape, all that remains is to add the updated Ant libraries / files.

Creating the CQ

Testing and Test builds

Back to the top