Friday, May 29, 2020

How to set up maven in mac os x

first download apache maven, the downloads url is: http://maven.apache.org/download.html

unpack it to a folder, say /Users/yourid/Downloads/apache-maven-3.3.3

modify your ~/.bashrc, make sure the following lines are there

export M2_HOME=/Users/yourid/Downloads/apache-maven-3.3.3
export PATH=$PATH:$PATH:$M2_HOME/bin

now you can use maven in command line and eclipse or intellij etc.

advanced maven command line

mvn dependency:resolve install
mvn versions:set -DnewVersion=1.2.2
mvn clean install -U
mvn dependency:tree

Eclipse common maven actions

right click a project,
preferences --> maven --> update project.
preferences --> Maven: select Download Artifact sources
preferences --> Maven --> installation: set the maven location
right click a project, run as --> maven install

No comments:

Post a Comment

meta.ai impression

Meta.ai is released by meta yesterday, it is super fast you can generate image while typing! You can ask meta.ai to draw a cat with curvy fu...