【问题标题】:Maven dependency issue in Mule projectMule项目中的Maven依赖问题
【发布时间】:2017-03-17 19:31:22
【问题描述】:

在 AnypointStudio 中创建新的启用 Maven 支持的项目时,我无法找到这个特定的 Maven 依赖项。当我尝试对现有的 Mule 项目进行 mavenize 时,也会出现同样的问题。有没有人解决这个问题? Anypoint Studio 版本 - 5.4.3 Mule 运行时版本 - 3.6.1

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.4:copy (copy-clover-plugins) on project tradeshift-connector: Unable to find artifact. Failure to find com.cloveretl:cloveretl-engine:zip:3.6.1 in http://repo1.maven.org/maven2/ was cached in the local repository, resolution will not be reattempted until the update interval of Central has elapsed or updates are forced
[ERROR] 
[ERROR] Try downloading the file manually from the project website.
[ERROR] 
[ERROR] Then, install it using the command:
[ERROR] mvn install:install-file -DgroupId=com.cloveretl -DartifactId=cloveretl-engine -Dversion=3.6.1 -Dpackaging=zip -Dfile=/path/to/file
[ERROR] 
[ERROR] Alternatively, if you host your own repository you can deploy the file there:
[ERROR] mvn deploy:deploy-file -DgroupId=com.cloveretl -DartifactId=cloveretl-engine -Dversion=3.6.1 -Dpackaging=zip -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
[ERROR] 
[ERROR] 
[ERROR] com.cloveretl:cloveretl-engine:zip:3.6.1
[ERROR] 
[ERROR] from the specified remote repositories:
[ERROR] Central (http://repo1.maven.org/maven2/, releases=true, snapshots=true),
[ERROR] mulesoft-releases (http://repository.mulesoft.org/releases/, releases=true, snapshots=true),
[ERROR] central (https://repo.maven.apache.org/maven2, releases=true, snapshots=false)

【问题讨论】:

  • 我遇到了这个问题并寻求帮助。有人不喜欢它并投了反对票。不明白出了什么问题。
  • 只需注释掉该依赖项。大多数时候我们不使用它,尽管它在您创建新的 maven 项目时默认出现在 pom.xml 中
  • 还有一些可用的存储库,您可以从中下载这些依赖项(例如 mule 的 nexus 存储库或 mule 的 ibiblio 存储库)

标签: maven mule


【解决方案1】:

转到您本地的 M2_REPO 文件夹并删除 /com/cloveretl 的内容。这将迫使 Maven 再次拉动它。

【讨论】:

  • 没有帮助。但更新是,当我从 Mule EE 存储库更改为 Mule 版本 3.7.3 时,它成功下载了此依赖项。这让我相信回购中不存在版本 3.6.1。不知道如何验证。
  • 如果您尝试访问特定的依赖 jar,我认为 Mule 版本并不重要。我查看了 mule release-ee repo,可以在以下位置看到 cloveretl 3.6.1 zip - repository.mulesoft.org/nexus/content/repositories/releases-ee/…。您需要您的 EE 凭据才能访问此网址。
  • 您有问题的日志显示 - repository.mulesoft.org/releases ... 这不是企业回购并且不包含三叶草等。您可以在浏览器中浏览进行验证。
  • 当我尝试获取 3.6.1 时,它会下载 3.6.0 RC1 zip,但在 3.6.1 中没有任何内容。考虑到 3.6.1 如您所见,这很奇怪。
【解决方案2】:

按照其他人的建议,转到您本地的 .m2 存储库并删除 /com/cloveretl 的内容。

Mule 正确地重新创建了文件夹,但 ZIP 文件名为 cloveretl-engine-3.6.1.zip。lastupdated

重命名为 cloveretl-engine-3.6.1.zip 就可以了。

【讨论】:

    猜你喜欢
    • 2022-11-26
    • 2020-10-28
    • 2016-09-15
    • 1970-01-01
    • 1970-01-01
    • 2012-11-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多