【发布时间】:2020-11-04 05:49:18
【问题描述】:
我正试图让我的团队从 STS 切换到 IntelliJ,但我在 POM 文件中遇到了这个我们在 STS 中看不到的错误。
下面的行抛出错误:“Element destFile is not allowed here” 这不会破坏任何东西,但我只是想确保没有错误。
<destFile>${jacoco.exec.path}</destFile>
我该如何解决这个错误?
<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>
【问题讨论】:
标签: maven intellij-idea pom.xml