关于 mvn -e clean install 的问题
在maven中,以下命令中的“-e”代表什么。
mvn -e clean install
之间有什么区别
mvn clean install
此外,和
mvn clean compile
In maven, what does "-e" stands for in the following command.
mvn -e clean install
Moreover, what is the difference between
mvn clean install
and
mvn clean compile
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
正如 Satish 所说,“-e”开关将在 Maven 输出中显示执行错误。
至于“安装”与“编译”的区别,这是不同的 Maven 生命周期阶段。请参阅构建生命周期简介文档以获取帮助那。要记住的关键是 Maven 将执行所有生命周期阶段,直到并包括您指定的阶段,然后停止。
具体来说,在您的情况下,“mvn cleancompile”将运行具有两个生命周期目标的 Maven,第一个是“clean”,第二个是“compile”。 “编译”生命周期阶段将运行构建并包括项目源代码的编译。 “安装”生命周期阶段将一直运行,将项目打包到其容器(jar、war 等)中,并将其安装到驻留在本地计算机上的本地 Maven 存储库。当项目安装到本地存储库时,您在计算机上构建的其他项目可以引用它,而无需了解源代码或项目构建工件实际驻留的位置。
As Satish stated, the "-e" switch will display execution errors in the maven output.
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.
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.
e 标志(e = 错误)打印出更详细的错误消息。
mvn clean install,编译、链接和安装(复制到应用程序服务器等)
有关更多 Maven 选项,请查看此参考卡
http://www.scribd.com/doc/15778516 /DZone-Refcard-55-Apache-Maven-2
或 maven 命令列表
http://cvs.peopleware.be/training/maven/maven2/mvnCommand.html
the e flag (e = errors) prints out more detailed error messages.
mvn clean install, does compilation, linking and installs (copies to app server etc)
for more maven options look at this ref card
http://www.scribd.com/doc/15778516/DZone-Refcard-55-Apache-Maven-2
or maven command list
http://cvs.peopleware.be/training/maven/maven2/mvnCommand.html
mvn clean install
- 首先,清理已经编译的类文件(可能在 target/ 目录中)。然后,它编译类,生成 jar,然后将创建的 jar 安装到本地 m2 存储库(可能位于 ~/.m2/repository/)。mvn cleancompile
- clean 的作用与上面相同。然后,它编译项目中的 java 文件。并且,停在那里。它不会创建 jar 或将任何内容安装到本地 Maven 存储库。-e
开关将显示构建失败时发生的堆栈跟踪。这是 java 程序在发生异常时生成的正常堆栈跟踪。请注意,Maven 本身是一个 Java 程序。mvn clean install
- First, cleans already compiled class files (probably in target/ directory). Then, it compiles the classes, generate the jar, and then install the created jar to your local m2 repository (probably located at ~/.m2/repository/).mvn clean compile
- The clean does the same thing as above. And, then, it compiles the java files in the project. And, stops there. It doesn't create the jar nor install anything to the local maven repository.-e
switch will display the stack-traces occur when your build is failed. It's a normal stack-trace that java programs produce when exceptions occur. Do note that Maven itself is a Java program.