iterator-maven-plugin
iterator-maven-plugin copied to clipboard
inherit plugin configuration
To avoid a lot of repetition in my pom files, and as a means to configure globally, I often pre-configure a plugin like with the logLevel here
<build>
<plugins>
<plugin>
<groupId>com.soebes.maven.plugins</groupId>
<artifactId>echo-maven-plugin</artifactId>
<version>0.4.0</version>
<execution>
<id>echo</id>
<phase>none</phase>
<goals>
<goal>echo</goal>
</goals>
<configuration>
<logLevel>DEBUG</logLevel>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
And then i expect to inherit that configuration in a child project
<build>
<plugins>
<plugin>
<groupId>com.soebes.maven.plugins</groupId>
<artifactId>echo-maven-plugin</artifactId>
<execution>
<id>echo</id>
<phase>package</phase>
<configuration>
<echos>
<echo>This is line number one</echo>
<echo>This is line number two</echo>
<echo>This is line number three</echo>
</echos>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
But now with the iterator plugin it seems I can't inherit configuration
<build>
<plugins>
<plugin>
<groupId>com.soebes.maven.plugins</groupId>
<artifactId>iterator-maven-plugin</artifactId>
<version>0.5.0</version>
<executions>
<execution>
<id>echo</id>
<phase>package</phase>
<goals>
<goal>iterator</goal>
</goals>
<configuration>
<items>
<item>one</item>
<item>two</item>
<item>three</item>
</items>
<pluginExecutors>
<pluginExecutor>
<plugin>
<groupId>com.soebes.maven.plugins</groupId>
<artifactId>echo-maven-plugin</artifactId>
<version>0.4.0</version>
</plugin>
<goal>echo</goal>
<configuration>
<echos>
<echo>This is line number @item@</echo>
</echos>
</configuration>
</pluginExecutor>
</pluginExecutors>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
Can I suggest adding a pluginExecutor/id tag that will cause the executor to inherit configuration from the plugin execution identified.