google / google/polymorphicDSL

Broken [dependency management model]

Open
#70 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
17
Forks
10
PR merge metrics
No merged PRs in 30d

Description

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:
```

com.google.pdsl
pdsl
${pdsl.version}


commons-logging
commons-logging


ch.qos.logback
logback-classic


ch.qos.logback
logback-core


org.jacoco
jacoco-maven-plugin


org.slf4j
slf4j-api


org.sonatype.sisu
sisu-guice



```

[Maven documentation: ](https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html)
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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.