Fork me on GitHub

iterator:iterator

Full name:

com.soebes.maven.plugins:iterator-maven-plugin:0.5.1:iterator

Description:

Executor will execute a given plugin by iterating through the given items.

Attributes:

  • Requires a Maven project to be executed.
  • Requires dependency resolution of artifacts in scope: test.
  • Binds by default to the lifecycle phase: package.

Required Parameters

Name Type Since Description
beginToken String - The token the iterator placeholder begins with.
Default value is: @.
endToken String - The token the iterator placeholder ends with.
Default value is: @.
iteratorName String - The name of the iterator variable.
Default value is: item.
pluginExecutors List - By using the pluginExecutors you can define a list of plugins which will be executed during executor.

<pluginExecutors>
  <pluginExecutor>
    ..Plugin
  </pluginExecutor>
</pluginExecutors>

A plugin must be defined by using the plugin tag. You can omit the version tag if you have defined the plugin's version in the pluginManagement section.

<plugin>
  <groupId>..</groupId>
  <artifactId>..</artifactId>
  <version>..</version>
</plugin>

Furthermore you need to define the goal of the given plugin by using the tag:

<goal>...</goal>

And finally you need to define the configuration for the plugin by using the following:

<configuration>
  Plugin Configuration
</configuration>


Optional Parameters

Name Type Since Description
content String - The list of items which will be iterated through. <content>one, two, three</content>
delimiter String - The delimiter which will be used to split the content.
Default value is: ,.
failAtEnd boolean - Fail the execution at the end of all iterations or fail the whole if one iteration step fails.
Default value is: false.
User property is: iterator.failAtEnd.
folder File - By using this folder you define a folder which sub folders will be used to iterate over. It will be iterated over the directories but not the sub folders so no recursion will be done. The order of the iterated elements is done by sortOrder.
items List - Here you can define the items which will be iterated through.

<items>
    <item>one</item>
    <item>two</item>
    <item>three</item>
    ..
  </items>

User property is: iterator.items.
itemsWithProperties List - If you like to have items to iterate through which also contain supplemental properties. This can be done by using the following:

<itemsWithProperties>
    <itemWithProperty>
      <name>one</name>
      <properties>
        <xyz>google</xyz>
      </properties>
    </itemWithProperty>
    <itemWithProperty>
      <name>two</name>
      <properties>
        <xyz>theseverside</xyz>
      </properties>
    </itemWithProperty>
    ..
  </items>
You are not determined having the same properties for the iterations. You can use different properties for each iteration.
skip boolean - If you like to skip the execution.
Default value is: false.
User property is: iterator.skip.
sortOrder String - This defines the sort order for the folders which will be iterated over. NameFileComparator.NAME_COMPARATOR NameFileComparator.NAME_INSENSITIVE_COMPARATOR NameFileComparator.NAME_INSENSITIVE_REVERSE NameFileComparator.NAME_REVERSE NameFileComparator.NAME_SYSTEM_COMPARATOR NameFileComparator.NAME_SYSTEM_REVERSE
Default value is: NAME_COMPARATOR.

Parameter Details

beginToken:

The token the iterator placeholder begins with.
  • Type: java.lang.String
  • Required: Yes
  • Default: @

content:

The list of items which will be iterated through. <content>one, two, three</content>
  • Type: java.lang.String
  • Required: No

delimiter:

The delimiter which will be used to split the content.
  • Type: java.lang.String
  • Required: No
  • Default: ,

endToken:

The token the iterator placeholder ends with.
  • Type: java.lang.String
  • Required: Yes
  • Default: @

failAtEnd:

Fail the execution at the end of all iterations or fail the whole if one iteration step fails.
  • Type: boolean
  • Required: No
  • User Property: iterator.failAtEnd
  • Default: false

folder:

By using this folder you define a folder which sub folders will be used to iterate over. It will be iterated over the directories but not the sub folders so no recursion will be done. The order of the iterated elements is done by sortOrder.
  • Type: java.io.File
  • Required: No

items:

Here you can define the items which will be iterated through.

<items>
    <item>one</item>
    <item>two</item>
    <item>three</item>
    ..
  </items>
  • Type: java.util.List
  • Required: No
  • User Property: iterator.items

itemsWithProperties:

If you like to have items to iterate through which also contain supplemental properties. This can be done by using the following:

<itemsWithProperties>
    <itemWithProperty>
      <name>one</name>
      <properties>
        <xyz>google</xyz>
      </properties>
    </itemWithProperty>
    <itemWithProperty>
      <name>two</name>
      <properties>
        <xyz>theseverside</xyz>
      </properties>
    </itemWithProperty>
    ..
  </items>
You are not determined having the same properties for the iterations. You can use different properties for each iteration.
  • Type: java.util.List
  • Required: No

iteratorName:

The name of the iterator variable.
  • Type: java.lang.String
  • Required: Yes
  • Default: item

pluginExecutors:

By using the pluginExecutors you can define a list of plugins which will be executed during executor.

<pluginExecutors>
  <pluginExecutor>
    ..Plugin
  </pluginExecutor>
</pluginExecutors>

A plugin must be defined by using the plugin tag. You can omit the version tag if you have defined the plugin's version in the pluginManagement section.

<plugin>
  <groupId>..</groupId>
  <artifactId>..</artifactId>
  <version>..</version>
</plugin>

Furthermore you need to define the goal of the given plugin by using the tag:

<goal>...</goal>

And finally you need to define the configuration for the plugin by using the following:

<configuration>
  Plugin Configuration
</configuration>

  • Type: java.util.List
  • Required: Yes

skip:

If you like to skip the execution.
  • Type: boolean
  • Required: No
  • User Property: iterator.skip
  • Default: false

sortOrder:

This defines the sort order for the folders which will be iterated over. NameFileComparator.NAME_COMPARATOR NameFileComparator.NAME_INSENSITIVE_COMPARATOR NameFileComparator.NAME_INSENSITIVE_REVERSE NameFileComparator.NAME_REVERSE NameFileComparator.NAME_SYSTEM_COMPARATOR NameFileComparator.NAME_SYSTEM_REVERSE
  • Type: java.lang.String
  • Required: No
  • Default: NAME_COMPARATOR