Setup Maven

Maven is a build automation tool used primarily for Java projects. This post help you setup maven on CentOS

  1. Download and setup Maven

    su - root
    cd /opt
    wget http://mirrors.digipower.vn/apache/maven/maven-3/3.3.3/binaries/apache-maven-3.3.3-bin.tar.gz
    tar -xzf apache-maven-3.3.3-bin.tar.gz
    mv apache-maven-3.3.3 maven
    
  2. Declare M2_HOME

    vi $HOME/.bash_profile
    # add following export command after line "export PATH"
    export M2_HOME=/opt/maven
    export PATH=$PATH:$M2_HOME/bin
    
  3. Reload .bash_profile

    source $HOME/.bash_profile
    
  4. Useful resources

    Snippet Maven

    Create Spring MVC Project by Maven Archetype

    Maven pom.xml Example

Comments

Popular posts from this blog

Reduce TIME_WAIT Socket Connections