Maven POM: how to insist property is not overridden

Posted by Joe Thomas on Stack Overflow See other posts from Stack Overflow or by Joe Thomas
Published on 2012-07-04T03:11:23Z Indexed on 2012/07/04 3:15 UTC
Read the original article Hit count: 230

Filed under:
|
|
|

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.

© Stack Overflow or respective owner

Related posts about inheritance

Related posts about maven