java - Is it necessary to specify version of a maven plugin in pom? -


i using netbeans development , has built-in menu feature allows add maven-checkstyle-plugin in pom code formatting . however, when click on menu add following piece of code in pom automatically without <version> information. ide keeps on complaining small hint message in margin saying 'version' tag missing. question is: plugins added has have <version> tag in pom?

pom.xml

 <reporting>         <plugins>             <plugin>                 <groupid>org.apache.maven.plugins</groupid>                 <artifactid>maven-checkstyle-plugin</artifactid>                 <configuration>                     <configlocation>config/sun_checks.xml</configlocation>                 </configuration>             </plugin>         </plugins>     </reporting> 

it not necessary, highly recommended use version tag.

when plugin invoked without explicit version given in pom or on command line, maven 2.x used pick latest version available latest version either release or snapshot. sake of stability, maven 3.x prefers latest release version on latest snapshot version.

given threat of non-reproducible builds imposed automatic plugin version resolution, feature scheduled removal far plugin declarations in pom concerned. users of maven 3.x find output warning when missing plugin versions detected encourage addition of plugin versions pom or 1 of parent poms. enforcer rule requirepluginversions can used additionally check missing plugin versions in pom.

https://cwiki.apache.org/confluence/display/maven/maven+3.x+compatibility+notes


Comments

Popular posts from this blog

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

objective c - Greedy NSProgressIndicator Allocation -

how to set an OCR language in Google Drive -