Maven 跳过根pom的插件执行

Maven 跳过根pom的插件执行,maven,maven-plugin,maven-module,Maven,Maven Plugin,Maven Module,你能告诉我如何跳过根pom的插件执行吗?此pom仅包含定义的模块: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"

你能告诉我如何跳过根pom的插件执行吗?此pom仅包含定义的模块:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <packaging>pom</packaging>
    <groupId>com.company</groupId>
    <artifactId>root</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>root</name>

    <modules>
        <module>bom-module</module>
        <module>moduleA</module>
        <module>moduleB</module>
    </modules>
</project>

4.0.0
聚甲醛
com公司
根
0.0.1-快照
根
bom表模块
模
模B
这是bom模块中的插件配置(moduleA和moduleB继承自bom):


com.spotify
dockerfile maven插件
${dockerfile maven plugin.version}
码头工人
建造
推
xxxxxx
${project.version}
target/${project.build.finalName}.jar
真的

当我想要为所有使用以下命令配置插件的模块执行插件时:
mvn com.spotify:dockerfile maven plugin:build
我在上下文目录:/home/denis/workspace/xxxx/root中得到错误
缺少dockerfile,这意味着插件是通过根pom执行的。我不能像在bom模块中那样跳过它,因为没有插件配置。谢谢。

完全错误,只在需要的模块中配置插件…只通过pluginManagement在根目录中定义版本…@khmarbaise是的,我做了。我已经在bom表中配置了插件,我的所有依赖项都放在哪里了。所有子项都使用bom作为父项,并且只有工件和版本。我的bom模块也有同样的错误,但我用
true
修复了它。但现在我不知道如何修复它的根。
            <plugin>
                <groupId>com.spotify</groupId>
                <artifactId>dockerfile-maven-plugin</artifactId>
                <version>${dockerfile-maven-plugin.version}</version>
                <executions>
                    <execution>
                        <id>docker</id>
                        <goals>
                            <goal>build</goal>
                            <goal>push</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <repository>xxxxxx</repository>
                    <tag>${project.version}</tag>
                    <buildArgs>
                        <JAR_FILE>target/${project.build.finalName}.jar</JAR_FILE>
                    </buildArgs>
                    <skip>true</skip>
                </configuration>
            </plugin>