Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does -B and -f flag do in Maven command? [duplicate]

Tags:

maven-3

For example:

mvn -B -f pom.xml....

What do they do? I found it somewhere in a code. I tried to google it out but didn't find any useful information. I'm new in Maven, only have basic understanding.

What I found in a code running on Jenkins CI/CD pipeline:

bat '''cmd.exe /C "'''+mavenVersion+''' -B -f pom.xml install....'''
like image 761
Shubham Patel Avatar asked Apr 04 '19 07:04

Shubham Patel


People also ask

What does clean install mean in Maven?

The short answer mvn clean install is the command to do just that. You are calling the mvn executable, which means you need Maven installed on your machine. (see How do you install Maven?) You are using the clean command, which will delete all previously compiled Java . class files and resources (like .

What will the mvn dependency tree command do?

mvn dependency:tree Command The main purpose of the dependency:tree goal is to display in form of a tree view all the dependencies of a given project. As we can see, maven prints the dependencies tree of our project.


1 Answers

I got my answer using mvn --help command. Thanks stackoverflow community !

-B : Run in non-interactive (batch) mode (disables output color)

-f : Force the use of an alternate POM file (or directory with pom.xml)

like image 162
Shubham Patel Avatar answered Nov 18 '22 14:11

Shubham Patel