[ 
https://issues.apache.org/jira/browse/MPLUGIN-504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17853021#comment-17853021
 ] 

Christoph Läubrich commented on MPLUGIN-504:
--------------------------------------------

> Yes sometimes the heuristic works

My experience is different, I never see it actually failing, so this "improves" 
just for very very special cases (e.g. when I name my maven plugin _literally_ 
"plugin" it will be empty).

> I always got a warning not setting the prefix since I started to write maven 
> plugin 10+ years ago so not sure we speak of much cases there

There is a difference between getting a *warning*  and *error* but now it is 
turned into a *failure* in a minor version increment, and in contrast to the 
JIRA referenced by the change it is *NOT* configurable. So if really the 
concern would be some edge cases (e.g. empty) it would be better to fail in 
cases it really fails ...

> That said an extension is trivial to get back previous behavior if so 
> critical?

How can maven-plugin-plugin be extended? Just curious... beside that its not 
_critical_ but at least _disturbing_ and _confusing_ the users that's why I 
listed some ideas how it can be improved. To summarize:

# Message is unclear and better would give a hint what to do, at best giving a 
snippet with the old computed prefix so one don't need to find it out somewhere 
else
# If also the case <something>-plugin would be supported and results in 
<something> most cases I know would already be covered instead of being 
stubbornly only allow maven-<something>-plugin (not allowed for 3rdparty) and 
<something>-maven-plugin (what often is just too verbose _and only a 
recommendation_).

> [regression] Goal prefix is required now
> ----------------------------------------
>
>                 Key: MPLUGIN-504
>                 URL: https://issues.apache.org/jira/browse/MPLUGIN-504
>             Project: Maven Plugin Tools
>          Issue Type: Bug
>            Reporter: Christoph Läubrich
>            Priority: Major
>
> With https://issues.apache.org/jira/browse/MPLUGIN-450 there was a regression 
> introduced that leads to previous working builds fail if the have not 
> configured a goalprefix, the error message is:
> >  You need to specify a goalPrefix as it can not be correctly computed
> This has several issues:
> # It does not explain why one "needs" a goalPrefix, nor what it is useful for 
> or why it can not be correctly computed.
> # It is effectively a breaking change in a minor version increment
> # The inital JIRA mentions that
> a) in general, goal prefix is *+optional+*, but "good to have", and usually 
> is present.
> b) we may want to have some option to turn off this feature
> # Now it is required and there is no option to turn it off
> Also the message is not true, the plugin has successfully computed a prefix 
> before without any issues:
> * If the artifact ends with -maven-plugin as in my-cool-maven-plugin the 
> my-cool was chosen
> * If the artifact ends with -plugin as in my-cool-plugin the my-cool was 
> chosen
> * otherwise the full artifact if was chosen as a prefix as in my-cool the 
> my-cool was chosen
> From a users point of view I don't see any problem or "disambiguates" with 
> this approach that justifies a breaking change here, anyone who is concerned 
> about not using this default can and already could choose a prefix and seem 
> to been fine with it for a long time.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to