We could perhaps distinguish: - pom with default goal available -> execute it - otherwise: print usage message
> On 8. Sep 2026, at 16:09, Gary Gregory <[email protected]> wrote: > > If you run mvn without args, then Maven runs the default goal, so it should > NOT print help. You could argue that the message should be clearer if there > are no args AND there is no default goal. > > 2c, > Gary > > On Tue, Sep 8, 2026, 09:44 Björn Raupach <[email protected]> wrote: > >> Hello Apache Maven developers, >> >> I'm looking for an explanation of a behaviour in Maven that I'm still >> unclear about. >> >> If I type the mvn command without any arguments I get an BUILD FAILURE. >> >> What I consider the better option is printing the usage or help instead. >> The output I am getting when executing mvn -h. >> >> In my humble opinion, this is a quick fix and a small, yet notable, >> improvement to usability for command line users. >> >> Something like this in the mvn shell script just before the final exec. >> >> if [ "$#" -eq 0 ]; then >> set -- "-h" >> fi >> >> kind regards >> Björn >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] >> >> -- Gerd Aschemann (er/he) --- Veröffentlichen heißt Verändern (Carmen Thomas) +49/173/3264070 -- [email protected] -- https://aschemann.net
