Difference between revisions of "Using Policy Files"

From Eclipsepedia

Jump to: navigation, search
(New page: Policy files allow a user to configure which version of a feature to update to when checking for updates. ==Creating the Policy File== A sample policy file is shown below: <update-polic...)
 
Line 5: Line 5:
  
 
  <update-policy>
 
  <update-policy>
   <url-map pattern="com.aptana.ide.feature" url="http://hostname/update/nightly/site.xml"/>
+
   <url-map pattern="feature.id" url="http://hostname/update/nightly/site.xml"/>
 
  </update-policy>
 
  </update-policy>
  
In this example, we save this to an XML file named "policy.xml". This is then placed next to the corresponding update site.xml. This effectively says "when I see feature with id x, instead go to update site y rather than the default". You can also use wildcards, such as com.aptana.ide.*
+
In this example, we save this to an XML file named "policy.xml". This is then placed next to the corresponding update site.xml. This effectively says "when I see feature with id x, instead go to update site y rather than the default". You can also use wildcards, such as feature.id.* if you have multiple features with the same prefix.
  
 
==Using the Policy File==
 
==Using the Policy File==
# Navigate to Window > Preferences > Install/Update, and paste in the URL to the policy file (such as http://hostname/update/nightly/policy.xml).
+
# In Eclipse, navigate to Window > Preferences > Install/Update, and paste in the URL to the policy file (such as http://hostname/update/nightly/policy.xml).
 
# Select "OK"
 
# Select "OK"
 
# The next time you search for updates, it should use the new URL specified in the policy file.
 
# The next time you search for updates, it should use the new URL specified in the policy file.
  
 
An additional thought is to provide a preference page to allow the end user to choose which "release stream" they wish to subscribe to. In this case, there is a radio button that might specify "stable", "rc" and "nightly". Selecting one of these radio buttons would automatically set the policy file behind the scenes.
 
An additional thought is to provide a preference page to allow the end user to choose which "release stream" they wish to subscribe to. In this case, there is a radio button that might specify "stable", "rc" and "nightly". Selecting one of these radio buttons would automatically set the policy file behind the scenes.

Revision as of 20:32, 5 March 2007

Policy files allow a user to configure which version of a feature to update to when checking for updates.

Creating the Policy File

A sample policy file is shown below:

<update-policy>
  <url-map pattern="feature.id" url="http://hostname/update/nightly/site.xml"/>
</update-policy>

In this example, we save this to an XML file named "policy.xml". This is then placed next to the corresponding update site.xml. This effectively says "when I see feature with id x, instead go to update site y rather than the default". You can also use wildcards, such as feature.id.* if you have multiple features with the same prefix.

Using the Policy File

  1. In Eclipse, navigate to Window > Preferences > Install/Update, and paste in the URL to the policy file (such as http://hostname/update/nightly/policy.xml).
  2. Select "OK"
  3. The next time you search for updates, it should use the new URL specified in the policy file.

An additional thought is to provide a preference page to allow the end user to choose which "release stream" they wish to subscribe to. In this case, there is a radio button that might specify "stable", "rc" and "nightly". Selecting one of these radio buttons would automatically set the policy file behind the scenes.