Today, I suddenly found that the web project package had 200 MB + of exe, and thought it should not be so big. So I checked and found that there were more than 130 referenced jar files, A lot of jar files with the same name but different versions are found. For example, there are two jar files with commons-httpclient, 3.0 and 3.1. This directly leads to a lot of repeated jar files under lib, and the size of the installer will naturally go up.
Open POM. run the mvn dependency: tree Command to view the dependency tree structure. Two jar files depend on the commons-httpclient jar, but the two dependent versions are different, so maven adds both versions.
The solution is to configure the jar file to be excluded from dependency through exclusions. Example:
Org. codehaus. xfire-all 1.2.6 org. springframework spring
In this way, the spring dependency in xfire is excluded. Similarly, you can see which jar files are repeatedly dependent Based on the maven dependency tree, and then exclude repeated items through exclusions.