Maven: What does "mvn

I have been told to use 'mvn clean install -P base' at work for a particular task. I am trying to find what it exactly means.

According to https://maven.apache.org/archives/maven-1.x/reference/command-line.html , -P lists all available plugins; and -p is used to specify a project file (assuming pom).

But when I typed 'mvn -P' in my command line, it throws an error saying:

Unable to parse command line options: Missing argument for option: P

usage: mvn [options] [<goal(s)>] [<phase(s)>]

What do the -P and -p stand for, and what are they used for exactly?


A reference tells us that -P specifies which profile Maven is to run under. Projects can define multiple profiles which may pull in different dependencies, so this is required if you have a project that can do that.

The -p flag isn't one I've run into in practice, nor does it really seem to exist in modern versions of Maven.

链接地址: http://www.djcxy.com/p/82946.html

上一篇: javac junit会给出“错误:package org.junit不存在”

下一篇: Maven:什么是“mvn