Question

If you want to know more about why I'm doing this, see this thread... http://dev.eclipse.org/mhonarc/lists/p2-dev/msg04735.html

OK, here we go...

I'm trying to use Eclipse's command line tool called the p2 Director Application to install a feature from my own p2 repository like so...

C:\SomeDirectory\eclipsec.exe -application org.eclipse.equinox.p2.director -repository http://my.domain.com/myapp/ -installIU com.mydomain.myapp.feature.group -destination C:\SomeDirectory -profile DefaultProfile -shared

Notice the -shared parameter at the end. If I remove it, everything works fine, but when it's there I get this in the error log...

!ENTRY org.eclipse.equinox.p2.director 4 1 2012-08-14 10:30:03.212
!MESSAGE Cannot complete the install because one or more required items could not be found.
!SUBENTRY 1 org.eclipse.equinox.p2.director 4 0 2012-08-14 10:30:03.212
!MESSAGE Software being installed: My Application Feature 1.0.1.20120813-1851 (com.mydomain.myapp.feature.group 1.0.1.20120813-1851)
!SUBENTRY 1 org.eclipse.equinox.p2.director 4 0 2012-08-14 10:30:03.212
!MESSAGE Missing requirement: AMX Application Plugin 1.0.1.20120813-1851 (com.mydomain.myapp 1.0.1.20120813-1851) requires 'bundle org.eclipse.core.runtime 0.0.0' but it could not be found
!SUBENTRY 1 org.eclipse.equinox.p2.director 4 1 2012-08-14 10:30:03.212
!MESSAGE Cannot satisfy dependency:
!SUBENTRY 2 org.eclipse.equinox.p2.director 4 0 2012-08-14 10:30:03.212
!MESSAGE From: My Application Feature 1.0.1.20120813-1851 (com.mydomain.myapp.feature.group 1.0.1.20120813-1851)
!SUBENTRY 2 org.eclipse.equinox.p2.director 4 0 2012-08-14 10:30:03.212
!MESSAGE To: com.mydomain.myapp [1.0.1.20120813-1851]

I've tried installing the same feature from the same update site using the GUI provided in my RCP application by Eclipse p2, and it works fine. The problem with this is that I need this feature installed without the user of my application having to install it using the GUI.

I've tried installing the same feature from the same update site without the -shared parameter and it works fine. The problem there is that when I turn up Windows UAC, it doesn't work due to the permissions issues with writing to the C:\Program Files\ directory.

I'm trying to figure out how to use this -shared parameter, so I can use the p2 Director application to successfully install this feature via command line when the user installs my application in the C:\Program Files\ directory in Windows with Windows UAC set to its default level which prevents Eclipse from installing IUs to the typical locations.

Here is some more background info if you'd like to know more about what I'm dealing with here...

https://bugs.eclipse.org/bugs/show_bug.cgi?id=249133

https://bugs.eclipse.org/bugs/show_bug.cgi?id=322929

https://bugs.eclipse.org/bugs/show_bug.cgi?id=343768

So if you have any ideas of how to get around UAC in Windows when installing an RCP application to the C:\Program Files\ directory, I'd love to hear from you.

Thanks for your time.

Was it helpful?

Solution

I'm not sure why, but adding more repositories to the -repository argument in the form of a comma separated list, resolved the issue. I have no idea why it didn't work only when using the -shared parameter. The resulting command that worked looked like this.

C:\SomeDirectory\eclipsec.exe -application org.eclipse.equinox.p2.director -repository http://my.domain.com/myapp/,http://my.domain.com/my-other-p2repo/ -installIU com.mydomain.myapp.feature.group -destination C:\SomeDirectory -profile DefaultProfile -shared
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top