Mvn install or Mvn package

后端 未结 8 1259
清歌不尽
清歌不尽 2020-12-07 13:41

I am new to Maven, I have a Java based web project with maven configured in my MyEclipse.
Now if I modified any java files then do I need to do Run as -> Mvn in

8条回答
  •  暖寄归人
    2020-12-07 14:14

    from 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

    So the answer to your question is, it depends on whether you want it in installed into your local repo. Install will also run package because it's higher up in the goal phase stack.

提交回复
热议问题