I was able to solve my problem. My plugin (with [3.2.0, 4.0.0) constraint) depends on another plugin that had a (wrong) version constraint [4.3.0, 5.0.0). Something in tycho or p2 decided to choose that one to populate the classpath for the compiler. This looks like a bug to me.
On Tue, Feb 4, 2020 at 10:57 AM Ed Willink <ed@xxxxxxxxxxxxx> wrote:
HI
Yes. I had a similar problem, but cannot find any trace of it in
my current releng.
My recollection is that one of the
{feature.xml, 'platform'.target, MANIFEST.MF}
references needed a precise four part version number to avoid
'P2' undermining it.
i.e try 3.2.0.v201101311130 rather than 3.2.0
IIRC it was the *.target, but a few painful hours were spent
trying alternatives and checking whether the build had actually
done as required.
Regards
Ed Willink
On 04/02/2020 15:39, Lutz Wrage wrote:
My target platform contains two ANTLR runtime plugins
org.antlr.runtime 3.2.0 (via Xtext) and 4.3.0 (via Sirius). In
one of my own plugins I need a dependency on the 3.2.0
version, so I added an explicit plugin dependency to the
manifest with a version range [3.0.0, 4.0.0) to the plugin
manifest.
The eclipse Plug-in Dependencies view correctly shows me
the 3.2.0 version and everything builds fine in Eclipse.
However, when running a tycho build I get compilation errors
in my plugin. Running with -X shows that the 4.3.0 plugin jar
is put in the classpath during compilation. mvn
dependency:tree shows a dependency on the 4.3.0 version.
Does anyone have an idea what may be wrong and how to fix
it?