I cant access, from a Maven module, to a property defined in the properties
section of the parent.
As a matter of fact When I launch the build below the warName is the default one.
This is the parent Pom
....
<modelVersion>4.0.0</modelVersion>
<groupId>com.speed.pms</groupId>
<artifactId>PMS-Main</artifactId>
<version>1.0.0</version>
<packaging>pom</packaging>
<name>PMS Main Build Project</name>
<properties>
<context-root>PMS-CUSTOM</context-root>
</properties>
<modules>
<module>../PMS-WEB</module>
</modules>
....
And this is the module
...
<parent>
<groupId>com.speed.pms</groupId>
<artifactId>PMS-Main</artifactId>
<version>1.0.0</version>
</parent>
<artifactId>PMS-WEB</artifactId>
<packaging>war</packaging>
<name>PMS-WEB Webapp</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<web.resource.dir>src/main/webapp</web.resource.dir>
</properties>
<build>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.4</version>
<configuration>
<!-- Context root from parent project -->
<warName>${context-root}</warName>
<webResources>
<resource>
<directory>${web.resource.dir}</directory>
</resource>
</webResources>
</configuration>
</plugin>
....
While I can use the ${project.parent.arctifactId} property. I try also ${project.parent.properties.context-root} but without success. It should be simple but I cant understand Which is my errror? Shouldn't be the properties inherited from the parent in a Module?