开发者

Using -P with mvn install command in a script .

I have this Linux s开发者_Python百科cript inside our server . This script is used for building the Application .

cvs checkout MacMoira
cd MacMoira
mvn clean 
mvn install -P MacMoira
exit 0

I did not understand this line "mvn install -P MacMoira" . Could anybody please tell me what is the use of using -P with mvn install .

Thank you very much .


-P specifies a profile in Maven with specific settings (in this case the profile MacMoira)

See: Introduction to profiles


when you run mvn --help it will return this information:

[...]
-P,--activate-profiles <arg>           Comma-delimited list of profiles
                                        to activate
[...]

within the maven's pom.xml there are <profiles> specified, these you can activate using the -P flag

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜