[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[p2-dev] Trying to use SynchronizeOperation
Hi Pascal, all:
I haven't been able to get the new SynchronizeOperation to work properly. I've created a small example reproducing my problem and pushed it to GitHub at:
It's all built using Maven/Tycho and there's a README file documenting the shape of the file structure in the distribution. If you 'mvn clean install' in the folder with the root pom, all required dependencies will be built and a JUnit test will run, illustrating what I'm trying to do and what it is doing instead.
I've been trying to get the new SynchronizeOperation to work, with limited success. Here's the scenario:
1) Export test.app.product to c:\temp. Wind up with:
2) Create a bundle, feature, site.xml (payload, payload.feature, payload.site) and build it. Make payload.site accessible via some web server. (The "payload" bundle only depends on "org.eclipse.runtime".)
3) In the test fixture application, in the SynchronizeOperation code, create a compound IQueryable pointing at both c:\temp\test.app\repository and payload.site. Ask for all IUs in both places.
4) Feed that query result into the SynchronizeOperation. The problem I've encountered is that the resulting update operation doesn't install payload.feature nor the payload bundle.
The fixture writes all installed Features to System.err at exit and the unit test reads these and tests expectations based on what is in or not in this list. There's also a fair bit of logging in the fixture, so you can see what IUs it's attempting to install/update.
5) I've made a small example that uses Maven/Tycho to demonstrate 100% of this and pushed it up to GitHub:
Just follow the README instructions to reproduce. You can either manually export the fixture as described above or you can run it immediately using Maven/Tycho (it can find and run the fixture automatically if the test is run through Maven/Tycho).
Please let me know what else I should try or what I might be doing wrong. Thanks in advance.