Home » Eclipse Projects » Equinox » Dependency from MANIFEST.MF does not show up in Plug-in Dependencies classpath container
Dependency from MANIFEST.MF does not show up in Plug-in Dependencies classpath container [message #1831022] |
Mon, 10 August 2020 04:45 |
Mirko Raner Messages: 125 Registered: July 2009 Location: New York City, NY |
Senior Member |
|
|
I'm in the process of upgrading a large project from Java 8 to Java 9, and I've finally succeeded to get everything to build via Maven, but now my Eclipse workbench has all kinds of problems. Specifically, there is a very fundamental dependency that is (and always was) listed in the MANIFEST.MF, but now, all of a sudden, this dependency is no longer reflected in the Plug-in Dependencies classpath container, and the workbench has hundreds of compilation problems due to that missing dependency:
net.bytebuddy.byte-buddy, version 1.10.14 is installed into the platform from a local update site (generated by a Maven build), but for some reason it does not make it to the classpath. I also noticed that the icon is somewhat different from the other dependencies (yellow ball overlay), and the only other dependency with that same icon is a dependency on another bundle in the workspace (the .runtime bundle whose full name is redacted in the screen shot). There are other dependencies that come from the same local update site (e.g., org.jgrapht.core), and those have the same regular icon as all the other dependencies.
The MANIFEST.MF lists the dependency in the regular manner, i.e.
...
org.jgrapht.core;bundle-version="1.4.0",
net.bytebuddy.byte-buddy;bundle-version="1.10.14",
javax.annotation;bundle-version="1.2.0"
Bundle-RequiredExecutionEnvironment: JavaSE-9
and I also checked the manifest of the Byte Buddy dependency itself, and it appears to be well-formed and it exports all the necessary packages.
Has anybody else seen this scenario (i.e., dependencies from the manifest don't make it into the classpath)? What other diagnostics can I run to track down what happens with the problematic dependency?
|
|
| |
Re: Dependency from MANIFEST.MF does not show up in Plug-in Dependencies classpath container [message #1831054 is a reply to message #1831026] |
Mon, 10 August 2020 23:34 |
Mirko Raner Messages: 125 Registered: July 2009 Location: New York City, NY |
Senior Member |
|
|
Thanks for your quick response, Ed! I ran Plug-in Tools ▸ Update Classpath..., and the only change to the .classpath file was in the order of the elements (the update moved the source folders to the bottom):
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-9">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
<accessrules>
<accessrule kind="accessible" pattern="org/eclipse/xtext/common/types/**"/>
<accessrule kind="accessible" pattern="org/eclipse/xtext/xbase/scoping/**"/>
<accessrule kind="accessible" pattern="net/bytebuddy/implementation/**"/>
</accessrules>
</classpathentry>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="src-gen"/>
<classpathentry kind="src" path="xtend-gen"/>
<classpathentry kind="output" path="bin"/>
</classpath>
At any rate, this appears to be in line with the BREE from the manifest:
Bundle-RequiredExecutionEnvironment: JavaSE-9
Double-clicking the problematic dependency indeed opens the manifest editor, and the manifest seems to be alright:
Manifest-Version: 1.0
Bundle-Description: Byte Buddy is a Java library for creating Java cla
sses at run time. This artifact is a build of Byte Buddy with
all ASM dependencies repackaged into its own name space.
Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt
Bundle-SymbolicName: net.bytebuddy.byte-buddy
Built-By: runner
Bnd-LastModified: 1596204806688
Bundle-ManifestVersion: 2
Tool: Bnd-3.5.0.201709291849
Main-Class: net.bytebuddy.build.Plugin$Engine$Default
Export-Package: net.bytebuddy;version="1.10.14",net.bytebuddy.agent.bu
ilder;version="1.10.14",net.bytebuddy.asm;version="1.10.14",net.byteb
.
.
.
",net.bytebuddy.jar.asm;version="1.10.14",net.bytebuddy.jar.asm.signa
ture;version="1.10.14",net.bytebuddy.jar.asm.commons;version="1.10.14
"
Bundle-Name: Byte Buddy (without dependencies)
Bundle-Version: 1.10.14
Multi-Release: true
Created-By: Apache Maven Bundle Plugin
Build-Jdk: 1.8.0_262
The dependency does not show up in Properties ▸ Java Build Path either.
I also verified that the bundle is properly installed in the platform, and that seems to be the case:
...
545|Resolved | 4|Apache Commons Math (2.1.0.v201105210652)|2.1.0.v201105210652
546|Resolved | 4|JGraphT - Core (1.4.0)|1.4.0
547|Resolved | 4|JHeaps (0.11.0)|0.11.0
548|Active | 4|Tycho Project Configurators (0.8.1.201704211436)|0.8.1.201704211436
552|Resolved | 4|Objenesis (2.6.0.v20180420-1519)|2.6.0.v20180420-1519
554|Resolved | 4|Byte Buddy (without dependencies) (1.10.14)|1.10.14
555|Resolved | 4|Byte Buddy Java agent (1.9.0.v20181106-1534)|1.9.0.v20181106-1534
556|Resolved | 4|mockito-core (2.23.0.v20200310-1642)|2.23.0.v20200310-1642
osgi>
I also tried restarting the workbench, closing/re-opening all projects, deleting/re-importing all projects, Project ▸ Clean..., etc., etc.
This all used to work fine with Byte Buddy 1.9.0 (from Orbit), which is almost two years old now and has several bugs that get in the way with Java 9 and higher.
However, I am seeing two differences between the manifest for Byte Buddy 1.9.0 and the manifest for version 1.10.14:
- the newer version's manifest does not have an Automatic-Module-Name entry
- the older version's manifest apparently has SHA-256-Digest entries for every single class file in the jar, which are not present in the new version's manifest
Could any of the above differences be the reason why the new JAR doesn't show up in the classpath?
|
|
| | |
Goto Forum:
Current Time: Sat Oct 12 04:41:54 GMT 2024
Powered by FUDForum. Page generated in 0.03954 seconds
|