我开始使用 Maven(尤其是 pom.xml)并决定安装 JUnit 4.12 ,但是在我将它添加到 pom.xml (依赖项)之后,我在加载过程中遇到错误:
问题是,依赖的仓库从http迁移到https,旧版本无法自行配置和下载。我尝试了英语 stackoverflow 的不同方法(特别是这个:https ://stackoverflow.com/questions/60031044/how-to-change-mavens-remote-repository-url-in-the-netbeans-ide-from-http- to-ht ) 我试图添加的地方
<repositories>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>Central Repository</name>
<url>https://repo.maven.apache.org/maven2</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<releases>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>Central Repository</name>
<url>https://repo.maven.apache.org/maven2</url>
</pluginRepository>
</pluginRepositories>
但这并没有帮助,我什至下载了最新版本的 Maven,但问题仍然存在。
如果有人面对?我相信一切都在引导我升级到 Apache NetBeans,但我确信有一种解决方法。
