Compiling the JAR Package
The binary packages available at the Kunpeng mirror site are compiled based on the open source code, and do not involve vulnerability or bug fixes.
When using open source software, comply with the applicable license agreements.
This document uses Dubbo as an example to describe how to deploy Java web applications. Therefore, Dubbo 2.7.5 must be compiled. For details, see Dubbo Porting Guide. You can create the dubbo-samples-api.jar package by compiling the code in this section or download it from the Huawei Cloud mirror site.
- Modify the pom.xml file.
- Go to the /home/dubbo-samples/dubbo-samples-api directory.
1cd /home/dubbo-samples/dubbo-samples-api/
- Open the file.
1vim pom.xml - Press i to enter the insert mode and add the following content to <properties>:
<maven-compiler-plugin.version>3.6.0</maven-compiler-plugin.version> <source.level>1.8</source.level> <target.level>1.8</target.level>

- Find the <build> module and replace it with the following content:
<build> <finalName>dubbo-samples-api</finalName> <plugins> <plugin> <artifactId>maven-assembly-plugin</artifactId> <executions> <execution> <phase>package</phase> <goals> <goal>single</goal> </goals> </execution> </executions> <configuration> <descriptorRefs> <descriptorRef>jar-with-dependencies</descriptorRef> </descriptorRefs> <appendAssemblyId>false</appendAssemblyId> <archive> <manifest> <mainClass>org.apache.dubbo.samples.provider.Application</mainClass> <mainClass>org.apache.dubbo.samples.client.Application</mainClass> </manifest> </archive> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>${maven-compiler-plugin.version}</version> <configuration> <source>${source.level}</source> <target>${target.level}</target> </configuration>nn </plugin> </plugins> <resources> <resource> <directory>src/main/</directory> <includes> <include>**/*.properties</include> </includes> <filtering>true</filtering> </resource> </resources> </build>
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Go to the /home/dubbo-samples/dubbo-samples-api directory.
- Package the file.
1mvn clean package


If BUILD SUCCESS is displayed, the packaging is successful.
- View the generated dubbo-samples-api.jar package.
1ll target/
Parent topic: Compilation