I'm analyzing a Maven plugin that I can configure inside the configuration
section of plugin
:
<plugin>
...
<executions>...</executions>
<configuration>
<!-- items placed here are visible to the MOJO -->
</configuration>
</plugin>
The plugin completely ignores any configuration items for an execution
, though:
<plugin>
...
<executions>
<execution>
<id>execution1</id>
<phase>test</phase>
<goals><goal>test</goal></goals>
<configuration>
<!-- items placed here are ignored -->
</configuration>
</execution>
</executions>
</plugin>
I run Maven with mvn test
. I'm sure that the execution takes place, as Maven prints its id
correctly, but the plugin is not configured -- prints warnings about incorrect settings that are not present when the <configuration>
section is moved outside of <executions>
.
The question: is it the way the plugin is implemented, that it accepts only "top level" configuration? I've studied its source code and it seemed to me that it's Maven that invokes setters on a MOJO class and it's transparent to the plugin which section the options came from.
The MOJO is annotated with:
* @component
* @goal test
* @phase test
* @execute phase="jasmine-process-test-resources"