In my project I have a parent pom with the following pluginManagement configuration:
<build>
<pluginManagement>
<plugins>
...
<plugin>
<groupId>org.apache.maven.plugin</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<encoding>utf-8</encoding>
</configuration>
</plugin>
...
</plugins>
</pluginManagement>
</build>
Now when I try to activate a plugin in a child-module. I get this error:
'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 42, column 12
In my child-module I have this plugin configuration:
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
</plugins>
</build>
How come the module doesn’t find the version attribute specified in its parents pom?
The first thing is cause you are using a wrong groupId. The correct one is org.apache.maven.plugins instead of org.apache.maven.plugin.
Furthermore you have defined an old version of the maven-compiler-plugin (2.5.1 instead of 3.0)