tycho icon indicating copy to clipboard operation
tycho copied to clipboard

duplicate parameters in multiple mojos of one plugin

Open Bananeweizen opened this issue 2 years ago • 4 comments

Just stumbled over this duplicate skip in the packaging plugin: grafik

To my understanding that can happen if multiple mojos of the same plugin declare identical names for options, right? Should we fix this by always introducing an abstract super class when we notice such clashes? Or is there anything in the maven build process for plugins that can be enabled to check for such clashes? Or a unit test looking at the parameters via reflection, some maven model utility etc.

Bananeweizen avatar Jul 02 '23 18:07 Bananeweizen

I think this issue is more something to report to leminx-maven.

mickaelistria avatar Jul 02 '23 20:07 mickaelistria

I think @mickaelistria is right and this is a leminx-mven issue I'm not aware that it is required for mojos to use distinct parameter names or extend a common class.

laeubi avatar Jul 03 '23 06:07 laeubi

If you try the above example on your local machine, then you would notice that the 2 skip options have different documentation being shown on the right (not visible in the screenshot), because those really are 2 entirely different options. How would the leminx plugin decide which one to show? I'm still in favor of avoiding this in the tycho plugin code instead.

Bananeweizen avatar Jul 04 '23 05:07 Bananeweizen

leminx should at least show that they are belong to different mojos then, I don't think this can be handled by Tycho especially if

because those really are 2 entirely different options

Having a baseclass only to share a single parameter that has different meanings do not sound like it solves anything.

laeubi avatar Jul 04 '23 05:07 laeubi