Maven has a jar package locally and still downloads the solution from the cloud

1. Problem background

The project references the jar package resources that do not exist in the cloud, put the jar package in the local maven library, and download it from the cloud when compiling, and report an error that the jar package cannot be found in the cloud.

2. Solutions

First, make sure that there are no errors in the maven path, jar package name, etc. If you still download from the cloud, you can execute the following command to initialize the jar package

mvn install:install-file -Dfile=C:\Users\user\.m2\repository\com\aspose\aspose-cad\23.1\aspose-cad-23.1.jar -DgroupId=com.aspose -DartifactId=aspose-cad -Dversion=23.1 -Dpackaging=jar

Results of the:

 problem solved.

Guess you like

Origin blog.csdn.net/secretdaixin/article/details/129948193