Maven POM: how to insist property is not overridden
- by Joe Thomas
I have a parent POM that uses a gmaven script to do some stuff:
<plugin>
<groupId>org.codehaus.gmaven</groupId>
<artifactId>gmaven-plugin</artifactId>
<version>1.4</version>
<configuration combine.children="override">
<providerSelection>2.0</providerSelection>
<scriptPath>${basedir}/build/groovy</scriptPath>
</configuration>
<executions>
<execution>
<id>groovy-properties-script</id>
<phase>validate</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<source>computeProperties.groovy</source>
</configuration>
</execution>
<!-- ... -->
All of the children are supposed to run this script as well, but they try to resolve the scriptpath based on their OWN basedir. Usually this is exactly what you want with properties, but here it doesn't work, and I can't figure out any way around it.