Hi Mikhail,
Many thanks for your response and yes, you were absolutely correct, I had indeed lost a bin./includes "." entry somewhere along the way. However, restoring it made no difference (other than to build the binary JAR correctly).
Per the post subject, my question really was about the combination Tycho+Maven+Eclipse+PDE and whether these layers can coexist happily - I think it's a reasonable assumption that anyone developing Eclipse plug-ins using Maven+Tycho+m2e will wish to debug them in a self-hosted runbench using PDE. My conclusion is that self-hosting doesn't work if the default Maven project structure is used, and that PDE is the culprit.
I found that having non-default <classpathentry kind="src" path="src/main/java"/> + <classpathentry kind="output" path="classes"/> in .classpath and source.. = src/main/java/ + output.. = classes/ in build.properties works just fine. However, changing .classpath to <classpathentry kind="output" path="target/classes"/> and build.properties to output.. = target/classes/ doesn't work. The problem occurs even for non-Maven/Tycho plug-in projects. On the face of it, it would seem to be the multiple output path segments that breaks the self-hosting classpath. Under the debugger the classpaths of the two configurations are different - see attached screenshots. In the single-segment case (bin or classes) the classloader has two classpath entries, the first of which uses a 'NestedDirBundleFile' bundleFile pointing to the bin or classes subdirectory. In the two-segment case (target/classes) the classloader has only one classpath entry that points to the plug-in directory, with no provision for loading anything from the target/classes subdirectory! I shall log a PDE bug.
![Inline images 2](pngjEnm9CpHau.png)
![Inline images 1](png5wGfbFo1dq.png)
So although this is clearly a PDE issue I've gone into this much detail as it is surely relevant to any Tycho user who tries to use the default Maven project structure and can't figure out what they're doing wrong. Something for the Tycho FAQ, perhaps?
Thanks,
--A