我是 Maven 新手,我有一个基于 Java 的 Web 项目,在我的 MyEclipse 中配置了 maven。
现在,如果我修改了任何 java 文件,那么我需要执行 Run as -> Mvn install
还是 Mvn package
?
最佳答案
来自 http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html
package
: take the compiled code and package it in its distributable format, such as a JAR.
install
: install the package into the local repository, for use as a dependency in other projects locally
因此,您的问题的答案是,这取决于您是否希望将其安装到本地存储库中。安装也将运行包,因为它在目标阶段堆栈中更高。
关于java - Mvn 安装或 Mvn 包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15530886/