我开始了一个新的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 中配置 lagom.xml(最好在父 pom 中使用依赖管理(