You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Dmitriy Neretin <dm...@googlemail.com> on 2011/05/03 17:08:36 UTC

Dependency Inheritance from parent POM and assembly plugin problem

Hello everybody,

I have a problem with inheritance of dependencies from the parent pom. I
have a multi-module project. The situation is that I need 2 jdbc drivers: an
older version (9.xxx) and a newer version (10.xxx). I declared these
dependencies in the parent pom like this:


<dependencyManagement>
<dependencies>

<dependency>
        <groupId>com.oracle</groupId>
        <artifactId>ojdbc14</artifactId>
        <version>local-10.2.0.1.0</version>
      </dependency>

    <dependency>
      <groupId>com.oracle</groupId>
      <artifactId>ojdbc14</artifactId>
      <version>local-9.0.2.0.0</version>
    </dependency>

</dependencies>
</dependencyManagement>

After that I declared these dependencies in the child pom:

<dependencies>
<dependency>
        <groupId>com.oracle</groupId>
        <artifactId>ojdbc14</artifactId>
        <version>local-10.2.0.1.0</version>
      </dependency>

    <dependency>
      <groupId>com.oracle</groupId>
      <artifactId>ojdbc14</artifactId>
      <version>local-9.0.2.0.0</version>
    </dependency>
</dependencies>

Now I'm trying to build an assembly (these drivers schould be stored in the
different directories), and get the following problem:
[WARNING] The following patterns were never triggered in this artifact
inclusion filter:
o  'com.oracle:ojdbc14:*:local-10.2.0.1.0'

Maven triggers just only one dependency! My assembly.xml looks like this:

<dependencySet>
            <outputDirectory>directoryA</outputDirectory>
            ...
            <include>com.oracle:ojdbc14:*:local-9.0.2.0.0</include>
            ...
</dependencySet>

<dependencySet>
            <outputDirectory>directoryB</outputDirectory>
             ...
            <include>com.oracle:ojdbc14:*:local-10.2.0.1.0</include>
</dependencySet>


Can somebody explain me please what is going wrong?
Thank you!