I want to inherit the dependencies of a (parent) pom.xml in a child project i.e. use Project Inheritance. It seems it is necessary to change the default packaging type from 'jar' to 'pom' in this case. But doesn't tell the Maven2 documentation that the packaging type 'pom' is necessary for Project Aggregation i.e. multimodule projects which use submodules but not for Project Inheritance (see http://maven.apache.org/guides/introduction/introduction-to-the-pom.html#Project_Inheritance)?
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>example</groupId>
<artifactId>example-parent</artifactId>
<version>1</version>
<dependencies>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.14</version>
</dependency>
</dependencies>
</project>
<project>
<parent>
<groupId>example</groupId>
<artifactId>example-parent</artifactId>
<version>1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>example</groupId>
<artifactId>example-child</artifactId>
</project>
But if you call maven (e.g. mvn clean) with this configuration you get an error:
Project ID: example:example-child
Reason: Parent: example:example-parent:jar:1
of project: example:example-child has wrong packaging: jar.
Must be 'pom'. for project example:example-child
With the entry
<project>
...
<packaging>pom</packaging>
...
</project>
in the parent pom.xml maven can be executed without any error.
Is this behavior of maven correct?