I have a plugin that takes a list inside its configuration:
<build>
<plugins>
<plugin>
<groupId>com.example</grouId>
<artifactId>fictional-plugin</artifactId>
<configuration>
<fictionalSet>
<setItem>First</setItem>
<setItem>Second</setItem>
<setItem>Third</setItem>
</fictionalSet>
...
</build>
The contents of <fictionalSet>
will change based on the current profile. Right now I am duplicating the plugin definition inside a profile and that feels a bit wasteful. What I'd really like is to define a set of items as a property:
<properties>
<fictional.set.items>
<setItem>First</setItem>
<setItem>Second</setItem>
...
</properties>
However, if I attempt the above then I get an error from Maven:
[ERROR] Non-parseable POM <path>/pom.xml: TEXT must be immediately followed
by END_TAG and not START_TAG (position: START_TAG seen ...
<fictional.set.items>\r\n\t\t\t<setItem>... @37:13) @ line 37, column 13
Is there a way to pass a list from a Maven property into a plugins configuration?