我执行Maven安装时错误构建Maven项目

时间:2018-10-18 17:53:08

标签: java spring eclipse maven webui

我正在尝试使用来自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'

1 个答案:

答案 0 :(得分:0)

我有同样的问题。

我已经重新启动Eclipse,然后继续执行项目特定的Maven模块,在该模块中您遇到了错误,右键单击> Maven>更新项目...

在对特定模块进行更新之后,Maven安装可以正常进行。