我正在使用maven-bundle-plugin
并尝试捆绑 Google 地图依赖项。
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-ClassPath>*;scope=compile|runtime</Bundle-ClassPath>
<Embed-Dependency>*;scope=compile|runtime</Embed-Dependency>
<Embed-Directory>OSGI-INF/lib</Embed-Directory>
<Import-Package>
*
</Import-Package>
<_exportcontents>
*
</_exportcontents>
</instructions>
</configuration>
</plugin>
当我检查 JAR (Manifest.MF) 时,我可以看到com.google.maps.model
inExport-Package
但看不到Import-Package
. 我怎样才能得到它Import-Package
呢?
这个问题链接到以前未解决的问题How to import a class from thirdparty jar file in an OSGi component