Rate This Document
Findability
Accuracy
Completeness
Readability

Installing Maven

This section describes how to compile WildFly 17.0.0.Final on CentOS 8.1.

  1. Go to the /root directory and download the maven-3.8.2 installation package.
    cd /root/
    wget https://archive.apache.org/dist/maven/maven-3/3.8.2/binaries/apache-maven-3.8.2-bin.tar.gz --no-check-certificate
  2. Decompress the package to the current directory.
    tar -zxvf apache-maven-3.8.2-bin.tar.gz
  3. Configure the environment variables.
    1. Open the /etc/profile file.
      vim /etc/profile
    2. Press i to enter the insert mode and add the following content to the end of the file:
      export M2_HOME=/root/apache-maven-3.8.2
      export PATH=$PATH:$JAVA_HOME/bin:$M2_HOME/bin
    3. Press Esc, type :wq!, and press Enter to save the file and exit.
    4. Make the environment variables take effect.
      source /etc/profile
  4. Verify the Maven version.
    mvn -v

    The installation is complete if the following information is displayed: