Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which Maven goal to use as no-op (for scripting purposes)?

Tags:

plugins

maven

I have a script on Jenkins CI which optionally does dependency:go-offline. The other option should be to do nothing. But I can't put "" in there - it must be a goal.

So - which one would you pick? It should:

  • Be in central, always reachable
  • Take minimum time
  • Have minimal output
  • Have no side effects

I was thinking of some help:... goal but those tend to have a lot of output. Any better?

like image 958
Ondra Žižka Avatar asked Jul 10 '12 20:07

Ondra Žižka


1 Answers

You can use this goal and option:

mvn --quiet help:help

the -q,--quiet option causes the output to only show errors.

Note that Jenkins allows you to add options like --quiet as diplayed in the usage: mvn [options] [<goal(s)>]. You configure these in the Jenkins job’s “Goals and options” field.

Check mvn --help output for further information.

I know this is an old question, but I came across it when I had the same requirement and it's still unanswered, so I'm posting for anyone who needs it in future.

like image 181
johnd Avatar answered Nov 03 '22 09:11

johnd