Maven 如何修复不允许的POM错误文件?

Maven 如何修复不允许的POM错误文件?,maven,intellij-idea,pom.xml,Maven,Intellij Idea,Pom.xml,我试图让我的团队从STS切换到IntelliJ,但我在POM文件中得到了这个错误,我们在STS中没有看到 下面的一行抛出错误:“此处不允许元素destFile” 这不会破坏任何东西,但我只想确保没有错误 <destFile>${jacoco.exec.path}</destFile> ${jacoco.exec.path} 如何解决此错误 <plugin> &l

我试图让我的团队从STS切换到IntelliJ,但我在POM文件中得到了这个错误,我们在STS中没有看到

下面的一行抛出错误:“此处不允许元素destFile” 这不会破坏任何东西,但我只想确保没有错误

                    <destFile>${jacoco.exec.path}</destFile>
${jacoco.exec.path}
如何解决此错误

            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>${jacoco.maven.plugin.version}</version>
                <configuration>
                    <excludes>
                        <exclude>**/*DTO.*</exclude>
                        <exclude>**/*Example.*</exclude>
                        <exclude>**/generated/**/*.*</exclude>
                        <exclude>**/constants/**/*.*</exclude>
                        <exclude>**/dto/**/*.*</exclude>
                        <exclude>**/mapper/**/*.*</exclude>
                        <exclude>**/model/**/*.*</exclude>
                        <exclude>**/domain/**/*.*</exclude>
                        <exclude>**/*.set*</exclude>
                        <exclude>**/*.get*</exclude>
                        <exclude>**/*.toString*</exclude>
                    </excludes>
                    <destFile>${jacoco.exec.path}</destFile>
                    <dataFile>${jacoco.exec.path}</dataFile>
                </configuration>
                <executions>
                    <execution>
                        <id>jacoco-initialize</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                        <configuration>
                            <destFile>target/coverage-reports/jacoco.exec</destFile>
                        </configuration>
                    </execution>
                    <execution>
                        <id>jacoco-site</id>
                        <phase>package</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                        <configuration>
                            <destFile>target/coverage-reports/jacoco.exec</destFile>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

org.jacoco
jacocomaven插件
${jacoco.maven.plugin.version}
**/*DTO*
**/*例如*
**/生成/***/**
**/常量/***/**
**/dto/****
**/映射器/***/**
**/型号/****
**/域/****
**/*.设置*
**/*.得到*
**/*.托斯特林*
${jacoco.exec.path}
${jacoco.exec.path}
jacoco初始化
配制剂
目标/覆盖率报告/jacoco.exec
杰科科遗址
包裹
报告
目标/覆盖率报告/jacoco.exec

不清楚您使用的是哪个版本的
JacoCoMaven插件
,但它似乎不支持此配置。将插件更新为
0.8.5
版本。

谢谢!我们使用的是0.8.3版,很抱歉,在完成mvn clean install0.8.5版后,我似乎仍在使用它。您是否在IntelliJ IDEA或命令行Maven build中发现错误?您是否根据重新导入了项目?如果问题仍然存在,请提供,因为我无法复制它。