Monday, January 9, 2012

When to use mvn:install vs mvn:deploy

mvn:deploy is used in the projects whose need is to upload the artifact or outcome of the build to centralized repository so that the dependant projects can also consume. These are typically the projects which can’t run on their own but referred by other projects. May be as a jar. This also adds the artifact on local repository.

mvn:install is used in those projects which needs the artifact on the local repository only and not in the centralized repository. Typically the project outcome is consumed only locally not used by other projects. These are the projects which can run on their own.

No comments:

Post a Comment