问题
I try to import this OSGI bundle [2]enj-library into eclipse (after compiling it with Maven) , I used: "File > Import...> Plug-in Development > Plug-ins and fragments"
and I imported the binary
but I got the following unresolved dependencies:
These dependencies were mentionned in pom.xml:
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>1.2.1</version>
<extensions>true</extensions>
<configuration>
<manifestLocation>META-INF</manifestLocation>
<instructions>
<Import-Package>!org.junit.*,
!org.reflections.*,!it.polito.elite.enocean.*,*,com.google.common.base;version="14.0", com.google.common.collect;version="14.0"</Import-Package>
<Export-Package>it.polito.elite.enocean.enj.*,
it.polito.elite.enocean.protocol.*</Export-Package>
<Private-Package>it.polito.elite.enocean.test</Private-Package>
<Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
<Bundle-RequiredExecutionEnvironment>JavaSE-1.7</Bundle-RequiredExecutionEnvironment>
<Embed-Dependency>org.reflections.*;scope=compile|runtime;inline=false</Embed-Dependency>
<Embed-Directory>target/dependency</Embed-Directory>
<Embed-StripGroup>true</Embed-StripGroup>
</instructions>
</configuration>
</plugin>
How can I solve this issue of unresolved dependencies? Thanks a lot for your help!
[2]https://github.com/dog-gateway/enj-library
回答1:
You will need to also install bundles that export these packages into your target platform.
来源:https://stackoverflow.com/questions/30917983/importing-an-osgi-bundle-into-eclipse