What references the <id> value of a Maven plugin execution?

The id element has two functions:

  1. Documentation
  2. Allow Maven to know when you want to create a new execution and when you want to modify an existing one.

The first case is simple: It just allows you to give the execution a meaningful name.

The second case means that Maven comes with default executions which you can see when you run mvn help:effective-pom, for example. If you want to replace/extend an existing execution, you need to use the same id. Maven will then merge the two.

See http://maven.apache.org/guides/mini/guide-configuring-plugins.html#Using_the_executions_Tag

Executions of the same id from different POMs are merged.

Tags:

Java

Maven