在我的Maven插件魔的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
此外,日食显示了这种错误的文件的开头:
The type org.apache.maven.plugin.BuildPluginManager cannot be resolved. It is indirectly referenced from required .class files
从我的理解,这意味着相关性JAR /战争具有此接口BuildPluginManager
是不存在的POM文件。 我的问题是,这依赖我需要拉在使用这个接口? 如何找到依赖?