Skip to content

Broken [dependency management model] #70

Open
@YuriiChukhrai

Description

@YuriiChukhrai

I am guessing you uploaded the uber/fat jar to the Maven central.
In that case the supplier of you framework/dependency is not able to exclude some dependency (transitive) that can came from your repo.
And regular maven mechanism to exclude dependencies does not work, and is required to implement some work around (re-pack your artifact and delete some classes)

This approach does not work with the uber/fat jar:

   <dependency>
      <groupId>com.google.pdsl</groupId>
      <artifactId>pdsl</artifactId>
      <version>${pdsl.version}</version>
      <exclusions>

        <exclusion>
          <groupId>commons-logging</groupId>
          <artifactId>commons-logging</artifactId>
        </exclusion>

        <exclusion>
          <groupId>ch.qos.logback</groupId>
          <artifactId>logback-classic</artifactId>
        </exclusion>

        <exclusion>
          <groupId>ch.qos.logback</groupId>
          <artifactId>logback-core</artifactId>
        </exclusion>

        <exclusion>
          <groupId>org.jacoco</groupId>
          <artifactId>jacoco-maven-plugin</artifactId>
        </exclusion>

        <exclusion>
          <groupId>org.slf4j</groupId>
          <artifactId>slf4j-api</artifactId>
        </exclusion>

        <exclusion>
          <groupId>org.sonatype.sisu</groupId>
          <artifactId>sisu-guice</artifactId>
        </exclusion>

      </exclusions>
    </dependency>

Maven documentation:
Dependency management - this allows project authors to directly specify the versions of artifacts to be used when they are encountered in transitive dependencies or in dependencies where no version has been specified. In the example in the preceding section a dependency was directly added to A even though it is not directly used by A. Instead, A can include D as a dependency in its dependencyManagement section and directly control which version of D is used when, or if, it is ever referenced.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions