关于MVN -E干净安装的问题 [英] question on mvn -e clean install

查看:111
本文介绍了关于MVN -E干净安装的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在maven中,以下命令中的"-e"代表什么.

In maven, what does "-e" stands for in the following command.

mvn -e clean install

此外,

mvn clean install  

mvn clean compile

推荐答案

如Satish所述,-e"开关将在maven输出中显示执行错误.

As Satish stated, the "-e" switch will display execution errors in the maven output.

关于安装"与编译"的区别,这是不同的Maven生命周期阶段.请参阅构建生命周期"简介文档以获取帮助那.要记住的关键是,Maven将执行直到您指定的所有生命周期阶段,包括您指定的阶段,然后停止.

As to the difference in "install" vs "compile", those are different Maven lifecycle stages. See the Introduction to the Build Lifecycle documentation for help with that. The key to remember is that Maven will execute all lifecycle stages up to and including the one you specify, and then stop.

具体来说,"mvn clean compile"将运行具有两个生命周期目标的Maven,第一个是"clean",第二个是"compile". 编译"生命周期阶段将运行直到项目源代码的编译,包括项目源代码的编译. 安装"生命周期阶段将贯穿整个过程,将项目打包到其容器(jar,war等)中,并将其安装到位于本地计算机上的本地maven存储库中.将项目安装到本地存储库后,您在计算机上构建的其他项目可以引用该项目,而不必知道源代码或项目构建工件实际位于何处.

Specifically in your case, "mvn clean compile" will run Maven with two lifecycle targets, the first being "clean", and the second being "compile". The "compile" lifecycle phase will run the build up to and including the compilation of project source code. The "install" lifecycle phase will run all the way through packaging your project into it's container (jar, war, etc) and will install it to your local maven repository, which resides on your local machine. When a project is installed to your local repository, other projects you build on your machine can reference it without having to have any knowledge of where the source code or project build artifacts actually reside.

这篇关于关于MVN -E干净安装的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆