我需要在配置阶段将 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,方法是:
- 将插件添加到功能中,并选中
“安装后解压插件存档”
,或者 - 直接在插件的
MANIFEST.MF
文件中使用Eclipse-BundleShape: dir
复制就会成功。
关于java - 从 jar 中复制 Eclipse p2 接触点,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45230225/