我启动了一个新的 Maven 项目,并尝试让 lagom
在我的 Maven 项目上工作。在我的运行配置中,我在命令行下输入了 lagom:runAll
。但是,当我运行我的项目时,出现以下错误:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.578 s
[INFO] Finished at: 2020-01-17T11:25:31+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] No plugin found for prefix 'lagom' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/home/andrea/.m2/repository), spring-milestones (https://repo.spring.io/milestone), spring-snapshots (https://repo.spring.io/snapshot), central (https://repo.maven.apache.org/maven2)] -> [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/NoPluginFoundForPrefixException
有谁明白为什么我找不到 lagom 图书馆?预先感谢您的帮助,干杯!
最佳答案
问题是 Maven 默认情况下不知道任何有关外部插件的信息,并且这扩展到了模块。除非在 pom.xml 中告知(隐式暗示任何父 pom),否则模块不知道其他模块中发生的情况。
您需要使用完整的 Artifact 名称调用 lagom,或者需要在 pom.xml 中配置 lagom(最好在父 pom 中使用依赖项管理)
关于java - 无法在 IntelliJ 上为我的 Maven 项目使用 lagom,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59785575/