[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.technology.equinox] p2 director application not updating target

Problem Summary
-----------------
When attempting to use the p2 director command line application to UPDATE my "destination" it is updating the profile, but NOT the actual bundle/artifacts - there is NO new plugin jar file in my eclipse/plugins directory.


Notes
--------
- I'd like to perform a simple P2 director command line UPDATE (not install or uninstall) of a target plugin/bundle using the directions at:
http://help.eclipse.org/galileo/topic/org.eclipse.platform.doc.isv/guide/p2_director.html - After multiple reviews of the link above, the p2 director seems to apply to installing and uninstalling products and features, but not *updating* products or features.


Scenario
----------
To produce a clean test case, I've done the following:
1) First created a new *Equinox* plugin called com.will - no cotributions to the UI - so not an RCP app. Then put a simple Activator.java in there verbosing on the bundle manifest revision for test's sake (see below).
2) Created a new Feature, with an OSGi launch configuration - again I want this to be a 'pure' OSGi/Equinox launchable application at the command line. Only Equinox related bundles are added and of course my com.will plugin from above.
3) Finally created product, built inclusive of the above feature. The relevant pieces are: a) my com.will plugin as the 'defining plugin' and b) the feature from #2 above.
4) Then off the product, I perform an export, exporting the product and the p2 metadata repository. 5) I manually separate the metadata repository (which most likely is intended to be 'published' to a web directory than rather in the actual product's directory) to a different file system location for the test's sake.
6) Now I want to publish *new/updated* code. So I make a small code modification (updated a java string) in the source code and ran another export. This time I dispose of the product directory but keep the new exported metadata repository - it contains the updated bundle and metadata XML files for download!
7) Now I issue the following command (assume all paths are correct):
\eclipsec.exe -application org.eclipse.equinox.p2.director -repository file:c:/Users/me/Desktop/tmp/repository-new -InstallIU com.will.plugin -destination file:c:/Users/me/Desktop/tmp/product-original/eclipse/ -bundlepool C:\Users\me\Desktop\tmp\product-original\eclipse -profile ProductProfile


8) It successfully updates the profile registry files within the p2 engine directory, but still no updated plugin jar file in the original eclipse/plugin directory.

Is it not possible to do a simple update with the p2 command line - or am I doing something wrong?

I'm sorry for my verbose scenario - just trying to provide enough information, then too little.

Thank you sincerely,
Will Stevens

=====================================
Bundle Activator code:



String VERSION = "3.0";

public void start(BundleContext context) throws Exception {
Bundle thisBundle = context.getBundle();
String symbolicName = thisBundle.getSymbolicName();
String version = thisBundle.getVersion().toString();
System.out.println(String.format("\n*** STARTING bundle %s, version %s.", symbolicName, version));
System.out.println("CODE VERSION: " + VERSION + "\n");
}


public void stop(BundleContext context) throws Exception {
Bundle thisBundle = context.getBundle();
String symbolicName = thisBundle.getSymbolicName();
String version = thisBundle.getVersion().toString();
System.out.println(String.format("\n*** STOPPING bundle %s, version %s.", symbolicName, version));
System.out.println("CODE VERSION: " + VERSION + "\n");
}