Installing Maven
This section describes how to compile WildFly 17.0.0.Final on CentOS 8.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
- Decompress the package to the current directory.
tar -zxvf apache-maven-3.8.2-bin.tar.gz
- Configure the environment variables.
- Open the /etc/profile file.
vim /etc/profile
- 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
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Make the environment variables take effect.
source /etc/profile
- Open the /etc/profile file.
- Verify the Maven version.
mvn -v
The installation is complete if the following information is displayed:

Parent topic: Configuring the Installation Environment