我正在使用 maven-bundle-plugin 构建一堆 Jar 文件的 OSGIed 版本,其中一些已签名。这似乎在我的构建中稍后会产生问题,并带有以下错误消息。
Exception in thread "main" java.lang.SecurityException: Invalid signature file digest for Manifest main attributes
我认为这是由于生成的 .RSA 和 .SF 文件被嵌入。如何在我的配置中指定排除这些文件?以下是我目前的配置。
<configuration>
<instructions>
<Export-Package>!javax.servlet.*,!org.apache.commons.logging,*</Export-Package>
<Embed-Dependency>*</Embed-Dependency>
<Embed-Directory>OSGI-INF/lib</Embed-Directory>
<Embed-Transitive>true</Embed-Transitive>
<Import-Package>!javax.jms,!javax.resource.*, !junit.*,!net.sf.ehcache,!net.spy.memcached,!org.apache.avalon.framework.logger,*</Import-Package>
</instructions>
</configuration>