这是indexloc提供的服务,不要输入任何密码
Skip to content

banDuplicateClasses does not support exclusions on runtime scope dependencies #102

@josple

Description

@josple

Impacts version: 3.0.0-M3

Assume group1:artifact1 has duplicate classes and that removing its group2:artifact2 transitive dependency is a way of resolving this duplicate class clash.

The banDuplicateClasses rule will pass with the following:

 ....
   <dependency>
      <groupId>group1</groupId>
      <artifactId>artifact1</artifactId>
      <exclusions>
        <exclusion>
          <groupId>group2</groupId>
          <artifactId>artifact2</artifactId>
        </exclusion>
      </exclusions>
      <scope>compile</scope>
    </dependency>
 ...

But it will not pass when the dependency is declared with runtime scope:

 ....
   <dependency>
      <groupId>group1</groupId>
      <artifactId>artifact1</artifactId>
      <exclusions>
        <exclusion>
          <groupId>group2</groupId>
          <artifactId>artifact2</artifactId>
        </exclusion>
      </exclusions>
      <scope>runtime</scope>
    </dependency>
 ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions