java - 从 jar 中复制 Eclipse p2 接触点

标签 java eclipse copy action p2

我需要在配置阶段将 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/

相关文章:

java - 使用replaceAll作为下标

java - 使用 byte-buddy 从字符串重写类方法?

Android ActionBarCompat 从一开始就不工作

java - SonarQube Eclipse 插件 : incremental mode for changed files only

linux - 从文本部分写入文本部分数据

java - JOOQ嵌套条件

java - 使用 System.getProperty() 获取 @CucumberOptions 标签属性

java - Java 中是否有类似于 C++ 的删除函数,以便将项目设置为 null 提示 GC?

linux - 如何在clearcase vob中实现 "cp -u"功能?

java - 如何使用 sendRedirect() 发送变量