A very common use case in a domain specific RCP app is to update itself using p2. When deploying this app, it would be very convenient if a list of predefined update sites could be available for the application at the first start. This was possible (but not trivial) even with Eclipse 3.4. But now, with Eclipse 3.5.1, it is very easy to do:
- Put your product configuration file in a bundle (plug-in project), not in a feature
- Create a file at top level and name it p2.inf
- Put the following content in the file:
addRepository(type:0,location:YOUR METADATA REPOSITORY);
addRepository(type:1,location:YOUR ARTIFACT REPOSITORY);
- Don’t forget to include p2.inf in the build.properties
You find a working example in my MP3 Manager demo application:
If you want to test is with file locations rather than Internet locations, you could use locations like
The above location works for Windows, mind that in the file case there is only one / after the colon.
A list of all available p2 touchpoint instructions you find in the Eclipse Wiki.