从 jar 复制 Eclipse p2 接触点

Eclipse p2 touchpoint copy from jar

我需要在配置阶段将位于 jar 中的文件复制到一个文件夹中,但我不确定这样做的正确方法是什么,如果可能的话。 这是我的 p2.inf 文件中的内容:

instructions.configure = \
org.eclipse.equinox.p2.touchpoint.natives.copy(source:${artifact.location}/res/np.sys, target:D:/np.sys, overwrite:true);

我的文件位于 jar -> res/np.sys 但我有 IOException,文件不存在

 Source: d:\Program Files\Test Program\plugins\com.vendor.testprogram.p2.installaction_1.0.0.201707210555.jar\res\np.sysdoes not exists

执行此操作的方法是在安装产品时解压 JAR,方法是:

  • 将插件添加到选中 "Unpack the plug-in archive after the installation" 的功能,或
  • 直接在插件的 MANIFEST.MF 文件中 Eclipse-BundleShape: dir

这样就复制成功了