可以在命令行上指定额外的插件目录吗

2022-01-16 00:00:00 eclipse-plugin eclipse

在 Eclipse 3.4 中,是否可以从命令行提供额外的插件目录?比如:

eclipse -plugin_dir D:/myproduct/V1.1/plugins -clean

这只是为了保存每次复制插件.

虽然可以使用脚本进行复制,但用户可能没有写入系统安装eclipse的权限.

<小时>

跟进:

@VonC 给出的解决方案是在多个 Eclipse 中重用相同的插件.

我正在寻找一个在相同的 Eclipse 中使用多个版本的插件.(如果用户安装了我的插件的 1.1 版和 1.2 版)

已解决:

  1. -Dorg.eclipse.equinox.p2.reconciler.dropins.directory指向的目录应该以一个名为eclipse"的目录结束

  2. 在这个 eclipse 里面应该有一个叫做 plugins 的目录,

  3. 将所有的jar包放在plugins目录中

  4. 创建一个启动器,它使用额外的命令行启动 eclipse:

<块引用>

-vmargs-Dorg.eclipse.equinox.p2.reconciler.dropins.directory=AbsolutePatheclipse

可能还想添加 -clean ..

解决方案

如 了解更多详情.

With Eclipse 3.4, is it possible to provide an ADDITIONAL plugin directory from command line? Something like:

eclipse -plugin_dir  D:/myproduct/V1.1/plugins -clean 

This is just to save copying of plugins everytime.

While copying can be done with script, it's possible that user may not have write permissions to system install eclipse.


Follow up:

The solution given by @VonC is for reusing same plugins in multiple Eclipses.

I'm looking for a to use Multiple versions of plugins with Same Eclipse. ( If user has Version 1.1 and Vesion 1.2 of my plugin installed )

Resolved:

  1. The directory pointed to by -Dorg.eclipse.equinox.p2.reconciler.dropins.directory should end with a directory named 'eclipse'

  2. Inside this eclipse where should be directory called plugins,

  3. place all the jars at in the plugins directory

  4. create a launcher , which launch eclipse with additional command line:

-vmargs -Dorg.eclipse.equinox.p2.reconciler.dropins.directory=AbsolutePatheclipse

One may want to add -clean also ..

解决方案

As mentionned in Installing Eclipse (3.4+) plugins in a directory other than ECLIPSE_HOME/plugins, the right way is to define a bundle pools (also introduced here)

See my previous answer for more details.

相关文章