Issue
I have a simple question about execution ID in maven plugin.
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>2.7.0</version>
<executions>
<execution>
<id>gwt-process-resources</id>
<goals>
<goal>i18n</goal>
<goal>generateAsync</goal>
</goals>
</execution>
</executions>
Can someone explain to me what does this executionId does? How are goals triggered? Can I call directly the "gwt-process-resources" in order to execute both goals? If yes, how can I do that?
Solution
<id></id>
exists only for you to be able to distinguish between other executions. This tag will be displayed when you do the actual build.
Your execution example will invoke the two goals you have specified: i18n
and generateAsync
.
If the plugin isn't bound to a specific phase (process-resources
, package
, install
, etc) your execution will not performed. The plugin's documentation should tell if this is the case.
You can specify/override the default phase by using the <phase
> tag:
...
<execution>
<id>gwt-process-resources</id>
<phase>process-resources</phase> <!-- If you need to override -->
<goals>
<goal>i18n</goal>
<goal>generateAsync</goal>
</goals>
</execution>
...
...
Goals are either triggered:
- Automatically (implicitly by their default phase or explicitly as above)
- By command line execution:
mvn <plugin name>:<goal>
Answered By - Daniel