我有一个pom.xml 而没有声明versions-maven-plugin
<!-- no need to declare this in my pom.xml, plugin still works -->
<plugin>
<!-- https://www.mojohaus.org/versions-maven-plugin/ -->
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>2.7</version>
<inherited>false</inherited>
</plugin>在使用mvn versions:display-property-updates时,即使我没有在pom.xml中包含插件,插件也能工作。maven发行版中是否包含了来自代码org.codehaus.mojo的所有插件?
发布于 2019-11-27 19:29:27
如果您查看the default settings.xml file that ships with Maven,您将看到:
pluginGroups
这是一个附加的组标识符列表,当通过前缀解析插件时,即调用命令行时,如"mvn前缀:目标“时,将搜索这些标识符。Maven将自动添加组标识符"org.apache.maven.plugins“和"org.codehaus.mojo”,如果这些标识符尚未包含在列表中.
您可以通过以下方式查看有效设置:
$ mvn help:effective-settings如果要添加其他组,可以在本地settings.xml (默认情况下位于$HOME/.m2/settings.xml)中这样做:
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<pluginGroups>
<!-- Add stackoverflow maven plugins -->
<pluginGroup>com.stackoverflow.plugins</plugingroup>
</pluginGroups>
</settings>https://stackoverflow.com/questions/59076702
复制相似问题