我正在尝试将以下 jar(以及其他)嵌入到 OSGi 包中。
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-xjc</artifactId>
<version>2.1.13</version>
</dependency>
maven-bundle-plugin 具有以下设置错误,Classes found in the wrong directory: {1.0/com/sun/codemodel/util/Surrogate$Parser.class=com.sun.codemodel.util.Surrogate$Parser, ...many more of these...}
因为此 jar 在 jar 的根目录下名为 1.0 的文件夹中有一堆类文件作为资源,这会将其丢弃。我该如何解决这个问题?
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<instructions>
<Embed-Dependency>*;scope=compile|runtime</Embed-Dependency>
<Embed-Transitive>true</Embed-Transitive>
<Export-Package>a.single.package.i.want.to.export</Export-Package>
<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
</instructions>
</configuration>
</plugin>