The best way to declare plugin versions is to use pluginManagement:
<build> <pluginManagement> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.18.1</version> </plugin> ... </plugins> <pluginManagement> </build>
In addition, it is best to declare all plugins and their corresponding version through pluginManagement in the parent pump (usually this is pom).
source share