I have created a Java application with the help of Maven plugin for using following maven goal:
mvn archetype:generate -DgroupId=net.javabeat -DartifactId=SampleJavaProject -DarchetypeArtifactId=maven-archetype-quick-start -DinteractiveMode=false
When -DinteractiveMode=false
, then project is created in batch mode, and when -DinteractiveMode=true
, then project is created in interactive mode.
I'm confused with interactive mode and batch mode. What are those?
To run Maven in batch mode use the following option: -B, --batch-mode. Run in non-interactive (batch) mode. Batch mode is essential if you need to run Maven in a non-interactive, continuous integration environment.
The batch-mode will automatically use default values instead of asking you via prompt for those values. The batch-mode can also be activated via --batch-mode
or -B
on command line.
Batch mode causes Maven to not display "Progress: 125/150kB" style lines when running. If you are running Maven on some server and then checking the logs afterwards, these progress lines take up 90% of the log and make it basically impossible to find the stuff that matters. Setting batch mode prevents this. Apart from that, I don't know any other use for batch mode. As others have said, I have never seen Maven prompt for anything during a build, regardless of whether interactive or batch mode is set.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With