Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Do not try to support 10+ years of legacy. It is warmly recommended to just forget about ill fated Maven 3.0, so consider Maven versions from 3.1 and above. Still, even with Maven 3.1 you cover 10 years. Currently Apache Maven project defines "minimal baseline" (prerequisite) of 3.2.5, but only in case of "trivial" plugins like maven-clean-plugin is. Still, "latest stable" it too high constraint as well. Best middle ground is something like "latest patch release of one/two minor versions minus from current stable" or some similar policy (as of writing: 3.8.6 7 is latest stable, hence 3.6.3 is sane middle ground). Also, do not forget that Maven versions since 3.3 were all Java 7, just like current latest stable 3.8.6 7 is!
  • This snippet shows only entries recommended/required for Maven Plugins! These are required for Maven Plugins, but as Maven Plugin is a Java Project, all the POM required elements, part of "best practices" for Java Project (parent POM, fixed plugin versions, etc) are not shown here!
  • Important: Maven 2.x was automatically "providing" org.codehaus.plexus:plexus-utils for plugins as well, or in other words, plugins did not had to to declare plexus-utils as dependency, it was "just there" (or they did, but in provided scope). Maven 3.x continued doing this as part of "backward compatibility" with Maven 2.x line, but this will not happen anymore with Maven 3.9 and 4.0! If your plugin uses plexus-utils, but does not have it declared as compile scoped dependency, it will fail in Maven 3.9.0 or later.
  • In case your plugin does a bit more than something trivial, you usually need to use more of Maven. In that case just add all the needed depenendencies in your POM as provided scoped. In general, it is true that all Maven artifacts having groupId org.apache.maven should be in provided scope. Important: There is one unfortunate exception to this rule above: org.apache.maven:maven-archiver. This artifact is not part of Maven Core, and uses unfortunate groupId. Should be org.apache.maven.shared instead.

...