BuildPluginManager的Maven依赖罐 [英] Maven Dependency jar for BuildPluginManager

查看:205
本文介绍了BuildPluginManager的Maven依赖罐的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的maven插件Mojo Java文件中,我正在导入接口

In my maven plugin Mojo Java file, I am importing interface BuildPluginManager using following line:

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在文件开头显示此错误:

Also, eclipse shows this error in the beginning of the file:

The type org.apache.maven.plugin.BuildPluginManager cannot be resolved. It is indirectly referenced from required .class files

据我了解,这意味着POM文件中不存在具有此接口BuildPluginManager的依赖项jar/war.我的问题是,使用该接口需要插入哪个依赖项?我如何找到这种依赖关系?

From what I understand, it means that the dependency jar/war that has this interface BuildPluginManager is not there in the POM file. My question is, which dependency do I need to pull in to use this interface? How do I find that dependency?

推荐答案

您需要包括对

You need to include dependency on org.apache.maven:maven-core:

<dependency>
    <groupId>org.apache.maven</groupId>
    <artifactId>maven-core</artifactId>
    <version>3.2.5</version>
</dependency>

您可以通过搜索Maven中央存储库By Classname来找到. 只需将org.apache.maven.plugin.BuildPluginManager放入Classname输入字段即可.

You can find this out by searching the Maven Central Repository, By Classname. Just put org.apache.maven.plugin.BuildPluginManager into the Classname input field.

这篇关于BuildPluginManager的Maven依赖罐的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆