无法读取 commons-jxpath:commons-jxpath:jar:1.3-osgi 的工件描述符:

Failed to read artifact descriptor for commons-jxpath:commons-jxpath:jar:1.3-osgi:

我在通过 maven 构建时遇到下面提到的错误。我尝试了很多解决方案,例如使用镜像,但其中 none 有效。请指出解决问题的方向。

Downloading: http://repository.codehaus.org/org/beanshell/bsh/2.0b4-osgi/bsh-2.0b4-osgi.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.779 s
[INFO] Finished at: 2016-05-23T13:26:22+05:30
[INFO] Final Memory: 16M/308M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project net-myproject-ticketing-reports: Could not resolve dependencies for project net.myproject.ticketing.reports:net-myproject-ticketing-reports:jar:1.0.1-SNAPSHOT: Failed to collect dependencies at com.myproject.resourcelib.thirdparty.framework:mule-mule-2.2.1:jar:2.2.1 -> org.mule.transports:mule-transport-bpm:jar:2.2.1 -> org.mule.modules:mule-module-client:jar:3.4.0 -> org.mule.modules:mule-module-xml:jar:3.4.0 -> commons-jxpath:commons-jxpath:jar:1.3-osgi: Failed to read artifact descriptor for commons-jxpath:commons-jxpath:jar:1.3-osgi: Could not transfer artifact commons-jxpath:commons-jxpath:pom:1.3-osgi from/to codehaus (http://repository.codehaus.org): Failed to transfer file: http://repository.codehaus.org/commons-jxpath/commons-jxpath/1.3-osgi/commons-jxpath-1.3-osgi.pom. Return code is: 503 , ReasonPhrase:Service Unavailable. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

问题是 codehaus.org 已关闭且不再可用,但旧版本的 Mule 仍然提到该存储库是解决某些依赖项的地方。特别是 commons-jxpath:commons-jxpath:jar:1.3-osgi 这似乎是 1.3 版的非标准重新捆绑,增加了 OSGI 支持。

你能做什么:

  1. 使用较新版本的 Mule no longer depends 在标准存储库中不可用的自定义工件上
  2. 查找托管此工件的不同存储库,并将自定义存储库位置添加到用户 settings.xml 或项目 pom.xml。

使用选项 2 随机谷歌搜索显示此存储库:(不确定它是否是一个好的选择!)

<repositories>
  <repository>
    <id>mule-old-dependencies</id>
    <url>http://repository.idega.com/maven2</url>
    <snapshots>
      <enabled>false</enabled>
    </snapshots>
  </repository>
</repositories>