I'm hitting a weird edge use case with Maven & curious why it's behaving the way it does.
I'm defining a property in my parent project like so:
<properties> <some.property.version>1.0.0.0</some.property.version> </properties> Now, in a module, I set a version of a dependency for a plugin like so:
<build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>bob</artifactId> <version>1.0.0.0</version> <dependencies> <dependency> <groupId>org.example</groupId> <artifactId>example</artifactId> <version>${some.property.version}</artifactId> </dependency> </dependencies> </plugin> </plugins> </build> This causes Maven to spit out an error:
[ERROR] 'build.plugins.plugin[org.apache.maven.plugins:bob].dependencies.dependency.version' for org.example:example:jar must be a valid version but is '${some.property.version}'. @ line 350, column 16
What's bizarre to me is if I move the property being defined down into the module itself, Maven compiles just fine. Is this a bug? Or are there restrictions of visibility to parent pom properties in a plugin for a module?