如何手动包含 maven 更新由于防火墙限制而无法获取的 jar 文件

How to manually include jar files that maven update fail to fetch due to firewall restricions

在删除 .m2 文件夹重新开始并使用选中强制更新选项的 Maven 更新后,当我尝试启动 tomcat 时出现以下错误,

Publishing failed with multiple errors
Error reading file C:\Users\***\.m2\repository\ca\juliusdavies\not-yet-commons-ssl[=10=].3.17\not-yet-commons-ssl-0.3.17.jar
C:\Users\***\.m2\repository\ca\juliusdavies\not-yet-commons-ssl[=10=].3.17\not-yet-commons-ssl-0.3.17.jar (The system cannot find the file specified)
Error reading file C:\Users\***\.m2\repository\org\opensaml\opensaml.6.6\opensaml-2.6.6.jar
C:\Users\***\.m2\repository\org\opensaml\opensaml.6.6\opensaml-2.6.6.jar (The system cannot find the file specified)

我可以从哪个存储库安全地下载这些 jar 文件以及如何手动将它们包含在项目中?

首先,您需要在本地系统上下载 jar。 然后使用以下命令安装它:

cd <path that includes your .jar file>
mvn install:install-file -Dfile=<jarfile.jar> -DgroupId=<group-id> -DartifactId=<artifact-id> -Dversion=<version> -Dpackaging=<jar>

versiongroupIdartifactIdpackaging 需要与您的 pom.xml

中的相同
<dependency>
  <groupId>your.groupID</groupId>
  <artifactId>your.artifactId</artifactId>
  <version>your.version</version>
</dependency>