Dependency isn't included in my assembly, although scope is "compile"

Posted by Bernhard V on Stack Overflow See other posts from Stack Overflow or by Bernhard V
Published on 2010-06-09T09:13:51Z Indexed on 2010/06/09 9:22 UTC
Read the original article Hit count: 309

Hi!

I have the following dependency specified in my project's pom:

<dependency>
    <groupId>org.jboss.client</groupId>
    <artifactId>jbossall-client</artifactId>
    <scope>compile</scope>
</dependency>

My project itself has to be the child of another pom. And in that one, the following is defined:

<dependency>
    <groupId>jboss</groupId>
    <artifactId>jbossall-client</artifactId>
    <version>4.2.2</version>
    <scope>provided</scope>
    <type>jar</type>
</dependency>

When I now assembly my program, it seems that the "provided" scope of the parent pom overrides the scope of my project, since the jbossall-client-jar is not included in my assembly. Although it seems illogical to me, maybe it's this feature taking effect here.

Do you know a way to include the dependency in my assembly without touching the parent pom?

© Stack Overflow or respective owner

Related posts about maven-2

Related posts about scope