I am working with Bndtools in Eclipse. I am trying to add Apache Thrift as dependency to a project. My build.bnd has this code for adding the Maven Central as well as our Nexus repository:
-plugin.5.Nexus = \
aQute.bnd.repository.maven.pom.provider.BndPomRepository; \
releaseUrls=https://<NEXUS_URL>:8081/content/groups/public/ ; \
snapshotUrls=https://<NEXUS_URL>:8081/content/groups/public/ ; \
index=${.}/release.maven; \
pom = ${workspace}/cnf/maven-nexus.xml; \
name="Nexus"
-plugin.6.MavenCentral: \
aQute.bnd.repository.maven.pom.provider.BndPomRepository; \
releaseUrls = https://repo1.maven.org/maven2/; \
pom = ${workspace}/cnf/maven-central.xml; \
name = Maven Central
I tried to add the dependency to both xml files like this:
<dependency>
<groupId>org.apache.thrift</groupId>
<artifactId>libthrift</artifactId>
<version>0.10.0</version>
</dependency>
Other dependencies like Gson work just fine. The bnd.bnd file of the project where I want to use Thrift only has this content:
-buildpath: \
org.apache.thrift
I also tried org.apache.libthrift, but I found out that this should be the correct OSGi bundle name. I always get
Cannot find /error/org.apache.thrift;version=0 Not found
Am I missing something here? I am new to OSGi and so I might miss something really obvious. I am also not sure if my configurations of the repositories are correct. Still, other dependencies work just fine. Thanks for any advice!
EDIT:
Maybe as additional information: In Eclipse the build.bnd file is shown empty in the GUI view. Does this mean, that my project is somehow corrupted or is this normal?
EDIT2: For testing (didn't help) I also added the Maven Central using the MavenBndRepository Plugin additionally to the BndPomRepository:
-plugin.7.MavenCentralAlternative = \
aQute.bnd.repository.maven.provider.MavenBndRepository; \
releaseUrl=https://repo.maven.apache.org/maven2/; \
index=${.}/central.maven; \
name="Maven Central Alternative"
EDIT3: The problem has to be Thrift related. All other packages work just fine, only Thrift is not found. My current workaround is to add the Thrift jar to the project manually and reference its dependencies as OSGi bundle just like I tried to add Thrift in the first place. Obviously I get now this warning:
Bndtools: The .classpath contains a library that will not be available during continuous integration