Setting Up the Environment
Hardware Environment
Table 1 shows the compiler hardware configurations.
Software Environment
Table 2 shows the compiler software configurations.
Installing JDK
- Download the JDK installation package and decompress it to the installation directory.
wget https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u252-b09/ OpenJDK8U-jdk_aarch64_linux_hotspot_8u252b09.tar.gz tar -zxf OpenJDK8U-jdk_aarch64_linux_hotspot_8u252b09.tar.gz -C /usr/local
- Configure the JDK environment variables.
- Open the /etc/profile file.
vim /etc/profile
- Add the JDK path to the profile file.
export JAVA_HOME=/usr/local/jdk8u252-b09 export PATH=$JAVA_HOME/bin:${PATH} - Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the /etc/profile file.
- Make the environment variables take effect.
source /etc/profile
Installing Maven
- Download the installation package and install Maven to a directory (for example, /opt/tools/installed).
wget https://archive.apache.org/dist/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz tar -zxf apache-maven-3.6.3-bin.tar.gz mv apache-maven-3.6.3 /opt/tools/installed/
- Modify the Maven environment variables.
- Open the /etc/profile file.
vim /etc/profile
- Add the following code at the end of the /etc/profile file:
export MAVEN_HOME=/opt/tools/installed/apache-maven-3.6.3 export PATH=$MAVEN_HOME/bin:$PATH
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the /etc/profile file.
- Make the environment variables take effect.
source /etc/profile
- Check whether the configuration takes effect.
mvn -v

- Modify the local repository path and remote repository in the Maven configuration file. Configuration file path: /opt/tools/installed/apache-maven-3.6.3/conf/settings.xml
The default local repository directory is ~/.m2/. If you want to change the directory, modify the localRepository tag. You do not need to modify this parameter unless otherwise specified.
Add the following content to the <mirrors> tag to configure the remote repository (change the repository to the Maven repository that you have built. If the Maven repository does not exist, configure it based on the following example):<mirrors> <id>mirrors.huaweicloud.com</id> <url>https://mirrors.huaweicloud.com/kunpeng/maven</url> <name>mirrors huaweicloud com</name> <snapshots> <enabled>false</enabled> </snapshots> </mirrors> <mirrors> <id>repository.huaweicloud.com</id> <url>https://mirrors.huaweicloud.com/repository/maven</url> <name>repository huaweicloud com</name> <snapshots> <enabled>false</enabled> </snapshots> </mirrors> If a proxy is used, add the proxy configuration to the settings.xml file. The details are as follows: <proxies> <proxy> <id>optional</id> <active>true</active> <protocol>http</protocol> <username>User_name</username> <password>Password</password> <host>Proxy_server_URL</host> <port>Proxy_server_port</port> <nonProxyHosts>local.net|some.host.com</nonProxyHosts> </proxy> </proxies>
Parent topic: Software Compiling