Java Maven&;中插件管理的范围;reporting.plugins.plugin.version缺少警告
我的Maven项目向我提供reporting.plugins.plugin.version警告,如下所示:Java Maven&;中插件管理的范围;reporting.plugins.plugin.version缺少警告,java,maven,plugins,jacoco-maven-plugin,Java,Maven,Plugins,Jacoco Maven Plugin,我的Maven项目向我提供reporting.plugins.plugin.version警告,如下所示: [WARNING] Some problems were encountered while building the effective model for com.example:test:jar:1.0-SNAPSHOT [WARNING] 'reporting.plugins.plugin.version' for org.jacoco:jacoco-maven-plugin is
[WARNING] Some problems were encountered while building the effective model for com.example:test:jar:1.0-SNAPSHOT
[WARNING] 'reporting.plugins.plugin.version' for org.jacoco:jacoco-maven-plugin is missing. @ line 10, column 21
我知道必须指定Maven 3和插件版本。我在pluginManagement中指定了版本:
<pluginManagement>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.2.201409121644</version>
</plugin>
</plugins>
</pluginManagement>
它不起作用,但是,在报告/插件中:
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
</plugin>
</plugins>
</reporting>
这似乎是旧版本maven中的一个bug。看看apache
。尝试使用Maven 3和Maven-site-plugin-3。这似乎是旧版Maven中的一个bug。看看apache
。尝试使用Maven 3和Maven-site-plugin-3。没错,我使用的是Maven 3.0.5,根据错误记录,该错误已在3.1.0中修复。谢谢!对,我使用的是Maven 3.0.5,根据bug记录,bug在3.1.0中得到了修复。谢谢!
<?xml version="1.0" encoding="UTF-8"?>
<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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>test</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<reporting>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
</plugin>
</plugins>
</reporting>
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.2.201409121644</version>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>