当我进行 maven 安装时构建 Maven 项目时出错



我正在尝试使用Eclipse的Spring Tool Suit构建一个Maven项目,但是在执行Maven安装时遇到了错误。

首先,我执行Maven清理,它工作正常,但是当我进行maven安装时,会出现此错误:

Failed to execute goal org.codehaus.mojo:build-helper-maven-plugin:1.9.1:regex-properties 
(set-properties-with-regex) on project qad-webshell-pom: 
Execution set-properties-with-regex of goal 
org.codehaus.mojo:build-helper-maven-plugin:1.9.1:regex-properties failed:
Plugin org.codehaus.mojo:build-helper-maven-plugin:1.9.1 or 
one of its dependencies could not be resolved: 
Failed to collect dependencies at org.codehaus.mojo:build-helper-maven-plugin:jar:1.9.1 -> 
org.beanshell:bsh:jar:2.0b4: Failed to read artifact descriptor 
for org.beanshell:bsh:jar:2.0b4: 
Could not transfer artifact org.beanshell:bsh:pom:2.0b4 from/to 
central (http://repo1.maven.org/maven2): 
Cannot access http://repo1.maven.org/maven2 with type default 
using the available connector factories: 
BasicRepositoryConnectorFactory: 
Cannot access http://repo1.maven.org/maven2 using the registered transporter
factories: WagonTransporterFactory: java.util.NoSuchElementException
[ERROR]       role: org.apache.maven.wagon.Wagon
[ERROR]   roleHint: http'

我遇到了同样的问题。

我已经重新启动了Eclipse,然后转到您遇到错误的特定于项目的maven模块,右键单击> Maven>更新项目...

在特定模块上更新后,Maven安装没有任何错误。

最新更新