Setting update site information in the installer

Configure the default update site information in your NexJ Studio installer repository for each installation of NexJ Studio.

Ensure that you have been provided the p2site repository folder, containing the build_script, p2_customize folders. Your installer is configured by reading the content.jar file in your p2site repository folder. To customize your installer, you need to recreate the content.jar file with your customized definitions. This is done by first editing the build_script/build.xml file and the p2_customize/content.xml file and then running the build.xml file as an Ant script.

Since completing this task recreates the content.jar file that is delivered in the p2site repository folder, make a backup of this file before proceeding.

To customize your installation to your specific needs:
  1. Open the p2_customize/content.xml file in a text editor.
    1. Update the location URL in the org.eclipse.equinox.p2.touchpoint.eclipse.addRepository entry to point to your update site location.
      The original value is http${#58}//localhost. Update both instances of the property. This specifies the location that NexJ Studio refers to in order to properly install new versions of NexJ Studio.
    2. Update the location URL in the org.eclipse.equinox.p2.touchpoint.eclipse.removeRepository entry to point to your update site location.
      The original value is http${#58}//localhost. Update both instances of the property. This specifies the location that NexJ Studio refers to in order to properly uninstall older versions of NexJ Studio during the upgrade process.
      Important: Any colons in the value that you specify must be replaced by ${#58}. For example, you should express the URL http://example.com/installer as http${#58}//example.com/installer.
  2. In the build_script folder, edit the build.xml file.
    1. Set the target_p2_repo entry to the filesystem path of the p2site repository folder. Ensure that you can write to the folder.
    2. Set the source_p2_repo entry to the filesystem path to p2_customize folder. These steps ensure that your update site location defined in your content.xml file links to your p2site repository folder.
  3. In the NexJ Studio Package Explorer, right-click the build.xml file and select Run As > 2 Ant Build....
    The Edit Configuration dialog displays.
  4. In the JRE tab, ensure that the Run in the same JRE as workspace option is selected.
  5. Click Run.

The Ant script reads the information contained in the content.xml file and uses it to recreate the content.jar file contained in the p2site repository folder. When this new JAR file is used for installation, it will automatically configure the update site information in the newly installed instance of NexJ Studio.