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 ?

Maybe you can open a PR/Gerrit/Whatever maven uses to show how this could bi implemented in m2e?

Am 13.01.20 um 19:04 schrieb Hohwiller, Jörg:

    I do not expect magic. I want a configuration option for maven
    users via
    their POM. This is what maven-eclipse-plugin solved perfectly and
    made
    users very happy.


So this Maven plugin had hardcoded the "magic" that turns checkstyle enablement in pom.xml into the right value for an Eclipse preferences.

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.

The maven user "hardcodes" (what is typically called configures) the checkstyle enablement by adding this strange CDATA section into his plugin configuration section.

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

It's basically what most m2e connectors are doing; and if this plugin were properly using the Maven BuildContext API as described in https://www.eclipse.org/m2e/documentation/m2e-making-maven-plugins-compat.html to notify if changed the .prefs files, then

    I do not expect m2e to know any black-magic or lists of maven plugins.


So how m2e would even know 1. what to read in pom.xml in order to 2. change which Eclipse/Checkstyle setting?

If you want to keep it generic then as stated above. The user configures which file should get which content. The documentation can guide the user to fill in the proper Eclipse magic to archive what is desired.

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.


    As Simon Bernard and tons of other users already requested since the
    last decade m2e could offer a simple config option to configure
    specific
    options that would be written to Eclipse project config (natures,
    features, additional config files files).
    See [1] for details.


Again, if this plugin were implemented to run as part of incremental build ( https://www.eclipse.org/m2e/documentation/m2e-making-maven-plugins-compat.html ), it could totally change the Eclipse config files as part of the build and Eclipse would react to those changes.
That is all very cool. But to activate checkstyle for projects that want to have it activated no incremental build is needed.

    I got the same answer when I asked m2e project years ago.
    Do m2e developers not want to see the need of their users?


The need is totally clear. And the current solution is usage of m2e connectors that cover this need. If you can make a concrete better proposal of how to translate Maven settings to Eclipse settings, that would be welcome.

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.

There are even Eclipse plugins that offer project specific settings that have no corresponding maven plugin.

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.

Cheers,

Thanks for your time and considering other points of view.

Best regards

   Jörg


_______________________________________________
m2e-dev mailing list
m2e-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/m2e-dev

_______________________________________________
m2e-dev mailing list
m2e-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/m2e-dev



Back to the top