Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-dev] eclipse-settings-maven-plugin future ?



On Mon, Jan 13, 2020 at 7:05 PM Hohwiller, Jörg <joerg@xxxxxxxxxxxxxx> wrote:
Nope. It is not the maven-eclipse-plugin that "hardcodes" any magic. It just offers configuration options to write files into the project directory filling in some variables, etc.

Ok, in that case, if user is taking care of defining in the pom.xml how to edit the file, then it just means the plugin that does the file edition should use the BuildContext API to notify it changed the file and can work in m2e, and all would be great.
This can be achieved by adopting the BuildContext APIs in Maven plugin, as it's actually recommended by Maven.

The maven-eclipse-plugin resolves the content and writes it to the specified file.

So the Maven plugin should use the BuildContext API so Eclipse would be informed of change in configuration files and would react to those.

An alternative would be a more structured approach that would however require that m2e would know about Eclipse-CS, etc. with the advantage of short and easy config but most probably with the drawback of a more tight coupling.

Than it's not generic anymore, and it seems totally equivalent to what m2e connectors are doing; expect that users have to pick their connectors from the recommended list at import (as m2e cannot know of Eclipse-CS and others).

That is all very cool. But to activate checkstyle for projects that want to have it activated no incremental build is needed.

The API is compliant with incremental build, but it also works on regular full builds. What matters is more that BuildContext is used and the lifecycle mapping is declared by the plugin, then Eclipse would be automatically informed of other changes (like checkstyle is enabled) and react accordingly.

I might have a different point of view. I personally do not think that the maven-checkstyle-plugin should be related or the trigger to activate eclipse-cs.

Ok, I agree.

So I would simply expect being able to add a (virtual) plugin entry corresponding to m2e in my pom.xml and use the <configuration> section of that plugin to configure the bells and whistles to configure the project in Eclipse.

That'd be interesting. I suggest you start opening a bug with this proposal, and maybe even a patch. I think a description in pom.xml of some recommended Eclipse plugins and Maven connectors to install for best usage could definitely help.

Back to the top