Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 481792

Summary: PDE feature does not require JDT feature
Product: [Eclipse Project] PDE Reporter: Konstantin Komissarchik <konstantin>
Component: BuildAssignee: Dani Megert <daniel_megert>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, Vikas.Chandra
Version: 4.6   
Target Milestone: 4.6 M4   
Hardware: All   
OS: All   
Whiteboard:

Description Konstantin Komissarchik CLA 2015-11-09 19:34:15 EST
PDE feature does not require JDT feature. If you start with a base platform and install PDE feature, you get a portion of JDT installed since individual PDE bundles depend on various JDT bundles. This in turns causes a PDE Build malfunction that's exposed by the JDT compiler change in Neon M3 (Bug 478427).

Repro:

1. Create the build driver install by starting with Neon M3 platform and installing only org.eclipse.pde.feature.group on top of it.

2. Create a target install using platform, org.eclipse.jdt.feature.group plus any other features you might need.

3. Build a simple hello world plugin using PDE build driver from #1 against #2 target.

The build will fail similarly to this:

[java] @dot:
     [java]     [mkdir] Created dir: d:\WS\40\trunk\neon\plugins\oracle.eclipse.tools.webtier.trinidad.ui\@dot
     [java]     [javac] Compiling 3 source files to d:\WS\40\trunk\neon\plugins\oracle.eclipse.tools.webtier.trinidad.ui\@dot
     [java]     [javac] Unable to load annotation processing manager org.eclipse.jdt.internal.compiler.apt.dispatch.BatchAnnotationProcessorManager from classpath.
     [java]     [javac] 
     [java]     [javac] Compilation failed. Compiler errors are available in d:\WS\40\trunk\neon\plugins\oracle.eclipse.tools.webtier.trinidad.ui/@dot.log
     [java] 
     [java] BUILD FAILED

Now modify #1 by installing org.eclipse.jdt.feature.group and re-run step #3. The build will succeed now.
Comment 1 Dani Megert CLA 2015-11-10 04:03:09 EST
For a smoother install experience it is recommended to define the dependencies directly between plug-ins [1]. This also avoids to install the complete feature even if parts are not needed.

What was missing in your case? I suspect org.eclipse.jdt.compiler.apt.

[1] https://wiki.eclipse.org/Version_Numbering#To_require_features_or_to_require_bundles
Comment 2 Konstantin Komissarchik CLA 2015-11-10 10:28:46 EST
I would contend that the argument on that wiki regarding feature vs. plugin dependencies is flawed. Bundle dependencies are for getting access to Java API. Feature dependencies are for establishing functional dependencies. If we were dealing with abstract libraries, purely bundle-based dependencies would be sufficient. For IDE toolsets, they aren't sufficient. While PDE may only need to manipulate JDT through the API of a few bundles (maybe just one), it doesn't make much sense to leave a user with an Eclipse installation that contains just a part of JDT. The user experience is unlikely to be as intended.
Comment 3 Dani Megert CLA 2015-11-10 10:41:47 EST
Can you just answer my question please?

> What was missing in your case? I suspect org.eclipse.jdt.compiler.apt.
Comment 4 Konstantin Komissarchik CLA 2015-11-10 10:44:21 EST
> What was missing in your case? I suspect org.eclipse.jdt.compiler.apt

If you are asking what was missing that triggered the behavior in question, I have no idea. I am not an expert on JDT internals.

If you are asking what was missing from the full JDT bundle set (as expressed by the JDT feature), I can get you that information.
Comment 5 Dani Megert CLA 2015-11-10 10:48:50 EST
(In reply to Konstantin Komissarchik from comment #4)
> > What was missing in your case? I suspect org.eclipse.jdt.compiler.apt
> 
> If you are asking what was missing that triggered the behavior in question,
> I have no idea. I am not an expert on JDT internals.
> 
> If you are asking what was missing from the full JDT bundle set (as
> expressed by the JDT feature), I can get you that information.

Yes, that's the information I need.

PDE Builds needs the compiler and hence also API, hence I think we need to add the JDT Core and APT compiler as requirement to PDE Build.
Comment 6 Konstantin Komissarchik CLA 2015-11-10 11:05:21 EST
Here is the list of the missing plugins as compared to an installation where JDT feature was installed:

org.eclipse.jdt.annotation_1.1.100
org.eclipse.jdt.annotation_2.0.100
org.eclipse.jdt.apt.core
org.eclipse.jdt.apt.pluggable.core
org.eclipse.jdt.apt.ui
org.eclipse.jdt.compiler.apt
org.eclipse.jdt.compiler.tool
org.eclipse.jdt.doc.user
org.eclipse.jdt.junit4.runtime
org.eclipse.jdt.launching.macosx
org.eclipse.jdt.launching.ui.macosx
org.eclipse.jdt

Keep in mind that fixing the PDE Build issue is not the only thing that needs to happen here. If this was an installation created by an end-user intending to use it for plugin development, they are not going to get the intended experience.
Comment 8 Konstantin Komissarchik CLA 2015-11-12 11:14:34 EST
Thanks. I found the correct Git commit record.

http://git.eclipse.org/c/pde/eclipse.pde.git/commit/?id=fbe90fc502b231a290f383ccbe4552317b1f90be
Comment 9 Vikas Chandra CLA 2015-12-09 00:50:08 EST
Dani, Can you please verify this one?
Comment 10 Dani Megert CLA 2015-12-09 11:15:34 EST
(In reply to Vikas Chandra from comment #9)
> Dani, Can you please verify this one?

Konstantin should do that.
Comment 11 Konstantin Komissarchik CLA 2015-12-09 16:17:37 EST
I will verify once M4 is out. I tried verifying with the latest integration build, but they seemed to be published to the downloads server differently. There is no mirror selection page and the checksum service doesn't work. The second aspect makes it impossible for me to use these builds in Sapphire build, which is what I need to do to verify this.
Comment 12 Vikas Chandra CLA 2015-12-15 04:05:42 EST
>I will verify once M4 is out.

Neon M4 is out. Can you please verify this bug.
Comment 13 Konstantin Komissarchik CLA 2015-12-16 13:32:11 EST
I have verified that with 4.6 M4 I no longer have to explicitly install JDT feature into the Eclipse installation that I call PDE Build from. Installing the PDE feature is sufficient to cause JDT to also be installed. Thanks.