java - Maven Reimport IntelliJ 不工作无法将工件转移到中央存储库
问题描述
我将 maven settings.xml 更改为指向本地存储库,现在当我尝试删除本地存储库标记以指向默认的 .m2/repository 文件夹并在 intellij 上运行重新导入时,或者当我在本地项目上运行重新导入时存储库,我收到此错误:
无法将工件 org.kie:kie-ci:pom:7.41.0.Final 从/传输到中央(https://repo.maven.apache.org/maven2):连接到 127.0.0.1:8866 [/127.0. 0.1]失败:连接被拒绝
当我运行重新导入时,这个错误在我所有的项目中都存在。
这是我的 pom.xml:
?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.2.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.example</groupId>
<artifactId>demo</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>demo</name>
<description>Demo project for Spring Boot</description>
<properties>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!-- https://mvnrepository.com/artifact/org.kie/kie-ci -->
<dependency>
<groupId>org.kie</groupId>
<artifactId>kie-ci</artifactId>
<version>7.41.0.Final</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.6</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
这是我的设置。xml
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<!--<localRepository>/Users/Eugene/drools/droolsEngine/dependencies</localRepository>-->
</settings>
请帮忙。谢谢
解决方案
Check if proxy was not not configured on your PC accidentally. In my case proxy was configured by https://www.telerik.com/fiddler on port 8866. And I overlooked this fact.
推荐阅读
- laravel - 在 laravel 控制器中使用 fileinput 传递附加输入
- javascript - Google Apps 脚本中的“共享驱动器”支持
- java - 检查两个字符串是否相似
- angular - 使用 ngrx/store 在两个不同的 Angular 应用程序之间共享存储/操作
- shell - shell脚本中的egrep
- python - 如何在 PySide2 中正确使用 CSS
- python-3.x - 如何应用多线程从 1000 个 URL 列表中获取工作 URL - Python
- c# - 如何在不写入完整路径的情况下读取 XML 文件,它应该适用于 C# WPF 中的其他计算机
- python - Python计算列表中n个项目的所有可能位置
- react-native - 模拟更改文本时出错以开玩笑的方式反应本机