1

我为 eclipse ( knime ) 编写了一个插件。但是eclipse生成的jar不包含任何类:

jar tvf plugins/fr.inserm.umr915.knime4ngs.nodes_1.0.0.jar
     0 Thu May 19 08:45:26 CEST 2011 META-INF/
  2543 Thu May 19 08:45:24 CEST 2011 META-INF/MANIFEST.MF
  7941 Thu May 19 08:45:24 CEST 2011 plugin.xml

这是我的清单的内容:

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Node extension for KNIME Workbench
Bundle-SymbolicName: fr.inserm.umr915.knime4ngs.nodes;singleton:=true
Bundle-Version: 1.0.0
Bundle-Vendor: Pierre
Require-Bundle: org.eclipse.core.runtime,
 org.knime.workbench.core,
 org.knime.workbench.repository,
 org.knime.base
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Export-Package: fr.inserm.umr915.knime4ngs.corelib.bio,
 fr.inserm.umr915.knime4ngs.corelib.knime,
 fr.inserm.umr915.knime4ngs.corelib.util,
 fr.inserm.umr915.knime4ngs.nodes.bam.view,
 fr.inserm.umr915.knime4ngs.nodes.sql.query;
  uses:="org.knime.core.node,
   org.eclipse.core.runtime,
   org.osgi.framework,
   org.knime.core.data,
   org.knime.core.node.defaultnodesettings,
   fr.inserm.umr915.knime4ngs.corelib.knime",
 fr.inserm.umr915.knime4ngs.nodes.unix.echo;
 (... other packages here ...)
  uses:="fr.inserm.umr915.knime4ngs.nodes,
   org.knime.core.node,
   org.eclipse.core.runtime,
   org.osgi.framework,
   org.knime.core.node.defaultnodesettings"

有帮助吗?谢谢

编辑:这是我的 build.properties:

bin.includes = plugin.xml,\
               META-INF/
4

1 回答 1

10

只是为了添加信息,插件的通用build.properties文件(标准项目/src目录定义了 3 个属性:

source.. = src/
output.. = bin/
bin.includes = plugin.xml,\
           META-INF/,\
           .,\
           icons/

source..output.... .,\inbin.includes告诉 eclipse 在导出时包含该库.

于 2011-05-19T13:27:58.220 回答