The problem is that even with BuildContext, types are still not resolved correctly. Even though the source compiles and runs fine, the editor does not know about any types, breaking things like organize imports and type completion and underlining almost everything with errors. Also, I think a builder should integrate much better with eclipse than the m2e execute mapping.
However, I'm stuck with writing my builder on a very simple problem: how do I add a dependency in a tycho project? I need javassist. The maven artifact for version 3.18.1-GA is a valid osgi bundle, but I just can't find a way to add it as a dependency. Eclipse keeps flagging the line in my MANIFEST.MF as error.
Best regards,
Emond Papegaaij
On Wednesday 22 January 2014 15:48:21 Igor Fedorenko wrote:
> I think BuildContext API is all you need, m2e incremental builder will
> take care of all plugin dependency resolution, classpath setup, mojo
> configuration and other plumbing.
>
> --
> Regards,
> Igor
>
> On 1/22/2014, 15:44, Emond Papegaaij wrote:
> > I agree. After reading some more about Eclipse internals, I think an
> > incremental project builder suits this usecase better. Currently, I've
> > created a project configurator that adds the builder and written some
> > code in the builder to resolve the maven plugin. It should not be too
> > difficult to read the plugin configuration and transform the classes.
> > However, I do have one question: how do I load the plugin dependencies
> > (e.g. the transformer implementation). This class is not on the
> > classpath in the plugin. Should I setup a new classloader with this
> > additional maven artifact jar? If so, is there an existing classloader I
> > can use? How does m2e solve this? It also needs to load additional
> > classes from external jars.
> >
> > Best regards,
> > Emond Papegaaij
|