时间折叠迁移命令不起作用,难道是命令错误?

问题描述 投票:0回答:1

最近我尝试借助 Timefold 官方网站上的 maven 命令来迁移我的 OptaPlanner 项目,但无论我做什么,它似乎都不起作用。我尝试过 ChatGPT(显然没有帮助),我尝试删除 ${username}/.m2/repository 下找到的存储库文件夹,仍然没有帮助。

PS C:\Users\username\Documents\New folder\project-name> mvn org.openrewrite.maven:rewrite-maven-plugin:4.46.0:run -Drewrite.recipeArtifactCoordinates=ai.timefold.solver:timefold-solver-migration:0.8.41 -Drewrite.activeRecipes=ai.timefold.solver.migration.ToLatest
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] Project Backend Application                                        [pom]
[INFO] MyProjectBackend                                                   [jar]
[INFO] OptaPlanner                                                        [jar]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Project Backend Application 1.0.0-DEV:
[INFO] 
[INFO] Project Backend Application ................... SKIPPED
[INFO] MyProjectBackend  ................................ SKIPPED
[INFO] OptaPlanner ........................................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.224 s
[INFO] Finished at: 2023-10-24T14:09:44+03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Error resolving version for plugin '.recipeArtifactCoordinates=ai.timefold.solver:timefold-solver-migration' from the repositories [local (C:\Users\username\.m2\repository), central (https://repo.maven.apache.org/maven2)]: Plugin not found in any plugin repository -> [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/PluginVersionResolutionException

如您所见,我已将我的项目和 optaplanner 分开,以加快生成时间表的过程,换句话说......微服务。但这并不重要,只需迁移一些依赖项即可。

无论如何,欢迎任何帮助!该项目是用SpringBoot Java编写的

java spring-boot microservices optaplanner timefold
1个回答
0
投票

在我看来,这像是 Windows 特定的问题,而不是由 Timefold Solver 引起的。考虑命令:

mvn org.openrewrite.maven:rewrite-maven-plugin:4.46.0:run -Drewrite.recipeArtifactCoordinates=ai.timefold.solver:timefold-solver-migration:0.8.41 -Drewrite.activeRecipes=ai.timefold.solver.migration.ToLatest

错误消息抱怨

.recipeArtifactCoordinates
不是有效的 Maven 插件。这告诉我,命令行的解析不正确,并且需要使用一些特定的语法才能在 Windows 上(特别是在 PowerShell 中)执行此操作。

这个问题很可能有你的答案。

© www.soinside.com 2019 - 2024. All rights reserved.