Я пытаюсь создать пакет с индексом (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
не находится в target/classes
, а динамически генерируется архиватором Maven.
Изменить 1
Когда я использую упаковку jar
вместо упаковки bundle
, индекс присутствует.
Изменить 2
Я использую Maven 3.0.4
target/maven-archiver
нет, толькоtarget/classes
,target/test-classes
,target/generated-sources
,target/generated-test-sources
иtarget/surefire-reports
. - person Philippe Marschall   schedule 21.10.2012mvn clean package
, но полученная банка не имеет индекса. - person Philippe Marschall   schedule 23.10.2012