However, for old projects, there are often cases where a local jar package is required. Use systemPath to load local jar packages, which is more natural and will not pollute the local warehouse.
<dependency> <groupId>sample</groupId> <artifactId>com.sample</artifactId> <version>1.0</version> <scope>system</scope> <systemPath>${project.basedir}/src/main/resources/yourJar.jar</systemPath> </dependency>