2

When I have a project that includes a POM, e.g. like this:

<dependency>
<groupId>org.jboss.arquillian</groupId
<artifactId>arquillian-bom</artifactId
<version>1.1.2.Final</version>  
<type>pom</type
<scope>test</scope>
</dependency>

then the POM is really downloaded to my local repository. And the POM contains a list of dependencies (I can check the POM file in my local repo, there is dependenManagement tag, and listed under there are a lot of dependencies, e.g. arquillian-config-api,shrinkwrap-descriptors-bom etc...), but those dependencies are not listed in mvn dependency:tree. The dependency tree looks like this:

...
\- org.jboss.arquillian:arquillian-bom:pom:1.1.2.Final:test
(no more lines below it)
...

but actually I would expect that Maven would show those dependencies as transitive dependencies. When the type of a dependency is of type JAR, then transitive dependencies are really shown.

Somehow, I think I don't understand what is the meaning of type "pom" when using Maven.

Until now, I thought it just means that instead of an artifact, it is just a POM that is inserted in the POM that is referring to it. So when I include a POM-typed dependency, the dependencies of the POM-type dependency are included.

But it seems that I am mistaken and the Maven documentation on the Internet has not helped me with this question.

Any ideas?

Toni Toni Chopper
  • 1,833
  • 2
  • 20
  • 29
msaladin
  • 405
  • 1
  • 5
  • 12
  • This answer should help you: http://stackoverflow.com/a/11779302/1570834. Basically dependencies defined in the dependencyManagement section are managed dependencies, they are not transitive included. You would only see dependencies listed in the `dependency:tree` output if the arquillian-bom defined a `dependencies` section - but it doesn't, hence you don't see any transitive dependencies. – DB5 Dec 06 '13 at 08:09

1 Answers1

0

POM type dependency is usually used to indicate the parent project in a parent child relational dependency hierarchy. POM type projects artifacts are not expanded in a maven reactor by default. Only when a concrete type like jar, war etc is build in the reactor are the dependency tress created and expanded for debug logging.

But you should not worry about it much. If you want to cross check these then the eclipse pom dependency hierarchy and effective pom tabs in the POM editor should be helpful.

Nazgul
  • 1,892
  • 1
  • 11
  • 15