简单。这是maven pom.xml中的felix插件:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<!-- allows the route to be ran via 'mvn camel:run' -->
<!-- <plugin> <groupId>org.apache.camel</groupId> <artifactId>camel-maven-plugin</artifactId>
<version>2.10.1</version> </plugin> -->
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-SymbolicName>xyz</Bundle-SymbolicName>
<Export-Package>tutorial.simplerouter</Export-Package>
</instructions>
</configuration>
</plugin>
</plugins>
</build>`
并且它没有正确生成MANIFEST.MF文件:
Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Created-By: Apache Maven
Built-By: rb
Build-Jdk: 1.6.0_35
在生成的manifest.mf之上,这是不正确的。
请告诉我原因。
答案 0 :(得分:3)
也许有点晚了,但我曾经遇到过类似的问题。我通过将<packaging>bundle</packaging>
添加到POM来解决。