Is it possible to invoke the same maven build a number of times with different configuration parameters?
I have a maven build that creates a number RPMs with the rpm
I believe the only way to achieve that during one maven execution is to bind several executions of the plugin (with different configurations) to a lifecycle phase, like this:
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<executions>
<execution>
<phase>test</phase>
<id>test-1</id>
<configuration>
...
</configuration>
<goals><goal>test</goal></goals>
</execution>
<execution>
<phase>test</phase>
<id>test-2</id>
<configuration>
...
</configuration>
<goals><goal>test</goal></goals>
</execution>
</executions>
</plugin>
</plugins>
...
</build>
You can attach this configuration to some profile triggered by one property (e.g. by mvn package -Denvironment=all
).