我开始了一个新的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(暗含任何父poms)中进行了说明,否则某个模块将不知道其他模块会发生什么。
您需要使用完整工件名称来调用lagom,或者需要在pom.xml中配置lagom(最好在父pom中使用依赖项管理)