Iterator Maven Plugin Version 0.3 Released
Hi to all,
i have released a new version of the Iterator Maven Plugin which can iterate over items.
-
The goal
executor
has been renamed toiterator
which is more releated to the things its doing. -
Added some documentation for the
folder
support which can be used to iterate over a directory which contains one or more folders.
Apart from that many technical aspects have been improved but which are not noteworthy for the users of this plugin. Anyone who is interested in such details just take a look into the git history of the project.
Furthermore if you find bugs, having ideas for improvements etc. do not hesitate to contact me via Github Issue tracking system.
The iterator-maven-plugin is available via Maven Central.
Here is an example how you can use the iterator-maven-plugin:
1<plugin>
2 <groupId>com.soebes.maven.plugins</groupId>
3 <artifactId>iterator-maven-plugin</artifactId>
4 <version>0.3</version>
5 <executions>
6 <execution>
7 <phase>package</phase>
8 <goals>
9 <goal>iterator</goal>
10 </goals>
11 <configuration>
12 <items>
13 <item>test</item>
14 <item>prod</item>
15 <item>dev</item>
16 </items>
17
18 <pluginExecutors>
19 <pluginExecutor>
20 <plugin>
21 <groupId>org.apache.maven.plugins</groupId>
22 <artifactId>maven-assembly-plugin</artifactId>
23 <version>2.4</version>
24 </plugin>
25 <goal>single</goal>
26 <configuration>
27 <descriptors>
28 <descriptor>${project.basedir}/@item@.xml</descriptor>
29 </descriptors>
30 </configuration>
31 </pluginExecutor>
32 </pluginExecutors>
33 </configuration>
34 </execution>
35 </executions>
36</plugin>
The following example shows how the new feature for folder iteration can be used. The real usage is only limited by your own imagination.
1<plugin>
2 <groupId>com.soebes.maven.plugins</groupId>
3 <artifactId>iterator-maven-plugin</artifactId>
4 <version>0.3</version>
5 <executions>
6 <execution>
7 <phase>package</phase>
8 <goals>
9 <goal>iterator</goal>
10 </goals>
11 <configuration>
12 <folder>src/main/java/com/soebes/maven/multiple/</folder>
13 <pluginExecutors>
14 <pluginExecutor>
15 <plugin>
16 <groupId>com.soebes.maven.plugins</groupId>
17 <artifactId>maven-echo-plugin</artifactId>
18 </plugin>
19 <goal>echo</goal>
20 <configuration>
21 <echos>
22 <echo>This is a message: @item@</echo>
23 </echos>
24 </configuration>
25 </pluginExecutor>
26 </pluginExecutors>
27 </configuration>
28 </execution>
29 </executions>
30</plugin>