在我的 maven 插件 Mojo Java 文件中,我使用以下行导入接口BuildPluginManager :
import org.apache.maven.plugin.BuildPluginManager;
此行给出以下错误:
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /Users/username/git/path/to/plugin/my-maven-plugin/src/main/java/com/company/product/repo/my_maven_plugin/ExecutorExampleMojo.java:[25,31] cannot find symbol
symbol: class BuildPluginManager
location: package org.apache.maven.plugin
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
此外,eclipse 在文件开头显示此错误:
The type org.apache.maven.plugin.BuildPluginManager cannot be resolved. It is indirectly referenced from required .class files
据我了解,这意味着具有此接口的依赖 jar/warBuildPluginManager
在 POM 文件中不存在。我的问题是,我需要引入哪个依赖项才能使用这个接口?我如何找到这种依赖关系?