Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » P2 » Plug-in jar remains after feature uninstall
Plug-in jar remains after feature uninstall [message #543176] Mon, 28 June 2010 15:40 Go to next message
Cameron Ross is currently offline Cameron RossFriend
Messages: 31
Registered: May 2010
Member
Hi,

I have an Eclipse plug-in and associated feature that have been developed using Eclipse for RCP/Plug-in Developers, Build id: 20100218-1602. I am using this environment to generate a "deployable feature" as an archive file.

When I install this feature everything works as expected. However, when I uninstall this feature, its plug-in jar gets left behind in the plugins folder.

If I modify the plugin jar within the archive and attempt to re-install, the new version of the jar is ignored and the old version is used (sigh).

If I attempt to delete the old plug-in jar manually, p2 complains:
"An error occurred during the org.eclipse.equinox.internal.provisional.p2.engine.phases.Ch eckTrust phase.
session context was:(profile=epp.package.java, phase=org.eclipse.equinox.internal.provisional.p2.engine.pha ses.CheckTrust, operand=, action=).
Error reading signed content.
The file "blahblahblah\plugins\myplugin.jar" does not exist"

I've tried starting Eclipse using the -clean argument after the uninstall process to clean up the caches, but this doesn't seem to work either.

How can I totally uninstall my feature from Eclipse?

Thanks,
Cameron.
Re: Plug-in jar remains after feature uninstall [message #543500 is a reply to message #543176] Tue, 29 June 2010 15:10 Go to previous message
Andrew Niefer is currently offline Andrew NieferFriend
Messages: 990
Registered: July 2009
Senior Member
p2 has a garbage collection mechanism which will clean up those jars later.
Installing something else should trigger the gc. Even though the jars
exist on disk, they won't be part of the running eclipse.

You can run the GC manually from the command line with a command like:
eclipse -application org.eclipse.equinox.p2.garbagecollector.application
-profile SDKProfile

Check your config.ini "eclipse.p2.profile" to see the actual profile to
specify, eclipse classic is "SDKProfile", but the different packages have
different profile ids.

The install itself acts as an artifact repository, and before the GC occurs,
that artifact repository still contains the jar. p2 has a fundamental
assumption that "id + version == one set of bytes", if you try to install a
particular plugin and that id_version already exists then p2 will not
bother re-downloading it.

If you go edit the jar, you end up invalidating the signature of the bundle.
You would also invalidate the MD5 checksum the install artifact repository
has for that bundle. If you just delete the jar, then the install artifact
repo thinks it has something that no longer exists on disk which can lead
to errors as well.

-Andrew


Cameron Ross wrote:

> Hi,
>
> I have an Eclipse plug-in and associated feature that have been developed
> using Eclipse for RCP/Plug-in Developers, Build id: 20100218-1602. I am
> using this environment to generate a "deployable feature" as an archive
> file.
>
> When I install this feature everything works as expected. However, when I
> uninstall this feature, its plug-in jar gets left behind in the plugins
> folder.
>
> If I modify the plugin jar within the archive and attempt to re-install,
> the new version of the jar is ignored and the old version is used (sigh).
>
> If I attempt to delete the old plug-in jar manually, p2 complains:
> "An error occurred during the
> org.eclipse.equinox.internal.provisional.p2.engine.phases.Ch eckTrust
> phase.
> session context was:(profile=epp.package.java,
> phase=org.eclipse.equinox.internal.provisional.p2.engine.pha
> ses.CheckTrust, operand=, action=). Error reading signed content. The
> file "blahblahblah\plugins\myplugin.jar" does not exist"
>
> I've tried starting Eclipse using the -clean argument after the uninstall
> process to clean up the caches, but this doesn't seem to work either.
>
> How can I totally uninstall my feature from Eclipse?
>
> Thanks,
> Cameron.
Re: Plug-in jar remains after feature uninstall [message #561428 is a reply to message #543176] Tue, 29 June 2010 15:10 Go to previous message
Andrew Niefer is currently offline Andrew NieferFriend
Messages: 990
Registered: July 2009
Senior Member
p2 has a garbage collection mechanism which will clean up those jars later.
Installing something else should trigger the gc. Even though the jars
exist on disk, they won't be part of the running eclipse.

You can run the GC manually from the command line with a command like:
eclipse -application org.eclipse.equinox.p2.garbagecollector.application
-profile SDKProfile

Check your config.ini "eclipse.p2.profile" to see the actual profile to
specify, eclipse classic is "SDKProfile", but the different packages have
different profile ids.

The install itself acts as an artifact repository, and before the GC occurs,
that artifact repository still contains the jar. p2 has a fundamental
assumption that "id + version == one set of bytes", if you try to install a
particular plugin and that id_version already exists then p2 will not
bother re-downloading it.

If you go edit the jar, you end up invalidating the signature of the bundle.
You would also invalidate the MD5 checksum the install artifact repository
has for that bundle. If you just delete the jar, then the install artifact
repo thinks it has something that no longer exists on disk which can lead
to errors as well.

-Andrew


Cameron Ross wrote:

> Hi,
>
> I have an Eclipse plug-in and associated feature that have been developed
> using Eclipse for RCP/Plug-in Developers, Build id: 20100218-1602. I am
> using this environment to generate a "deployable feature" as an archive
> file.
>
> When I install this feature everything works as expected. However, when I
> uninstall this feature, its plug-in jar gets left behind in the plugins
> folder.
>
> If I modify the plugin jar within the archive and attempt to re-install,
> the new version of the jar is ignored and the old version is used (sigh).
>
> If I attempt to delete the old plug-in jar manually, p2 complains:
> "An error occurred during the
> org.eclipse.equinox.internal.provisional.p2.engine.phases.Ch eckTrust
> phase.
> session context was:(profile=epp.package.java,
> phase=org.eclipse.equinox.internal.provisional.p2.engine.pha
> ses.CheckTrust, operand=, action=). Error reading signed content. The
> file "blahblahblah\plugins\myplugin.jar" does not exist"
>
> I've tried starting Eclipse using the -clean argument after the uninstall
> process to clean up the caches, but this doesn't seem to work either.
>
> How can I totally uninstall my feature from Eclipse?
>
> Thanks,
> Cameron.
Previous Topic:Plug-in jar remains after feature uninstall
Next Topic:cannot find packages for p2
Goto Forum:
  


Current Time: Fri Apr 19 00:48:08 GMT 2024

Powered by FUDForum. Page generated in 0.02064 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top