Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

banDuplicateClasses does not support exclusions on runtime scope dependencies #102

Open
josple opened this issue Aug 14, 2020 · 1 comment

Comments

@josple
Copy link

josple commented Aug 14, 2020

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>
 ...
@slawekjaranowski
Copy link
Member

can you provide a example which can be executed to confirm?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants