Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven - Auto Respond 'yes' on all user input

Tags:

java

maven

Currently I have a grails/maven project. Right now I'm upgrading my grails proj to 1.2.1. The problem is that the upgrade asks for user input, and if I my CI server tries to build it, it will stall asking the user if he wants to upgrade certain plugins.

Is there a way to tell maven to respond 'y' on all user input?

like image 845
Miguel Ping Avatar asked Feb 08 '10 10:02

Miguel Ping


2 Answers

Try using the --batch-mode option. This is supposed to automatically answer questions with "sensible" default answers ... whatever that means.

Failing that, on UNIX / LINUX you could try yes | mvn <options> ...

like image 78
Stephen C Avatar answered Oct 08 '22 01:10

Stephen C


I found out that grails upgrade target has a '--non-interactive' option that disables user input. It was just a matter of wiring this with my CI server.

like image 2
Miguel Ping Avatar answered Oct 08 '22 02:10

Miguel Ping