Install: Install the package into the local repository, for use as a dependency in other projects locally.
Goal: mvn clean install
Deploy: Done in an interation or release environment, copies the final package to the remote repository for sharing with other developers and projects.
Goal: mvn clean deploy
Note: Removes the files from a project's working directory, that were generated at build-time. Alternatively we can execute the plugin: mvn clean:clean That will do the same thing.
5.6. Install Maven through CLI:
Download and copy the latest Maven installation link in /opt folder. You can get the latest binary link from here: https://maven.apache.org/download.cgi
Once downloaded extract that binary link using below command: