Adding "pdebuild.jar" inside the "org.eclipse.pde.build" bundle to the compile classpath?

72 Views Asked by At

When I look at following the jar located at following coordinate on maven central:

<dependency>
    <groupId>org.eclipse.pde</groupId>
    <artifactId>org.eclipse.pde.build</artifactId>
    <version>3.11.0</version>
</dependency>

I see a wired content. There is no *.class files inside.

Content of the 'org.eclipse.pde.build-3.11.0.jar'

Only the META-INF/MANIFEST.MF seems to be relevant and correct.

Corresponding to the source: https://git.eclipse.org/c/pde/eclipse.pde.build.git/tree/org.eclipse.pde.build/META-INF/MANIFEST.MF

When I try to use the jar referenced by its maven central coordinates in my code, the Gradle build fails with an expected:

error: cannot access org.eclipse.pde.internal.build.IBuildPropertiesConstants

Which make sense because the class is located in pdebuild.jar inside the org.eclipse.pde:org.eclipse.pde.build:3.11.0 jar.

I guess this line in the MANIFEST telling the Eclipse compiler to look at the jar inside the jar as well:

Bundle-ClassPath: pdebuild.jar

If I put the pdebuild.jar (manually extracted from the jar fetched on maven central) on the classpath:

Content of the 'pdebuild.jar' extracted from 'org.eclipse.pde.build-3.11.0.jar'

Then I am able to compile.


How to make Gradle aware of this Bundle-ClassPath OSGi directive?

I found this related question: Gradle: Properly build classpath from OSGI dependency's MANIFEST.MF

From the answer, this doesn't seems to be possible

0

There are 0 best solutions below