Maven compilation and packaging failed, unable to load the jar package under local lib/ (package XXX does not exist)

Recently, the company’s project has introduced a third-party jar package, and the number is relatively large. Another consideration is that only one project is used alone, so it is not considered to be placed on the remote server warehouse, but when the project is packaged, it can be compiled and packaged successfully. .

Insert picture description here
The above is the solution, the core is to cut off the red position of the icon, the code is as follows:

<compilerArguments>
                        <extdirs>${project.basedir}/src/main/webapp/WEB-INF/lib</extdirs>
                    </compilerArguments>

The meaning of the above configuration is that in the process of project compilation and packaging, in addition to importing dependencies from the local warehouse, the jar package under the specified path will also be automatically imported!

Guess you like

Origin blog.csdn.net/wujian_csdn_csdn/article/details/112508480