【问题标题】:Is there any method to clean old plugins/features from disk automatically once new plugin/features are installed in eclipse RCP?在 eclipse RCP 中安装新插件/功能后,是否有任何方法可以自动从磁盘中清除旧插件/功能?
【发布时间】:2021-02-10 14:30:15
【问题描述】:

我正在构建一个 RCP 应用程序,每个季度都会在其中更新功能/插件。因此,如果用户选择自动更新功能/插件,则会下载更新插件的新 jar,但旧插件仍在使用我不再使用的磁盘空间。

我已经厌倦了删除包含旧jar信息的安装历史。当我尝试删除它时,它会显示以下给定的消息

但这不会删除 .jar,我仍然可以在我的功能/插件文件夹中找到它。

此外,这是一个手动过程。那么,当有更新版本的新jar时,有什么方法可以自动删除旧插件。

【问题讨论】:

    标签: eclipse eclipse-plugin eclipse-rcp p2


    【解决方案1】:

    在您的 plugin_customization.ini 文件中启用 p2 垃圾收集器,如下所示:

    # after upgrading delete the plug-ins that are no longer needed
    org.eclipse.equinox.p2.ui.sdk.scheduler/gcOnStartup=true
    

    有关详细信息,请参阅 Eclipse wiki:Equinox p2 FAQ - Why aren't bundles being removed when their associated feature has been removed?

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-11-20
      • 1970-01-01
      • 2014-02-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多