META-INF/INDEX.LIST
我正在尝试使用maven-bundle-plugin
2.3.7构建一个具有索引 () 的包。
我的插件配置看起来像这样
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<archive>
<index>true</index>
</archive>
<instructions>
<!-- other things like Import-Package -->
<Include-Resource>{maven-resources}</Include-Resource>
</instructions>
</configuration>
</plugin>
但META-INF/INDEX.LIST
不会出现在 JAR 中。我试着用
<Include-Resource>{maven-resources},META-INF/INDEX.LIST</Include-Resource>
但这将失败
[ERROR] Bundle com.acme:project::bundle:1.0.0-SNAPSHOT : Input file does not exist: META-INF/INDEX.LIST
[ERROR] Error(s) found in bundle configuration
这并不奇怪,因为META-INF/INDEX.LIST
它不在 Maven Archiver 中target/classes
而是由 Maven Archiver 动态生成的。
编辑 1
当我使用jar
而不是bundle
包装时,索引就在那里。
编辑 2
我正在使用 Maven 3.0.4