0

我正在尝试使用来自 Eclipse 的 Spring Tool Suit 构建一个 Maven 项目,并且在执行 Maven 安装时出现错误。

首先,我执行 Maven Clean 并且它可以正常工作,但是当我执行 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'
4

1 回答 1

0

我遇到过同样的问题。

我已经重新启动了 Eclipse,然后继续你有错误的项目特定的 maven 模块,右键单击 > Maven > 更新项目 ...

在特定模块的更新之后,Maven 安装工作没有任何错误。

于 2019-05-14T09:58:44.243 回答